- NewspaperHeader ads
- NewspaperSidebar ads
- NewspaperArticle Ad
- NewspaperPost template ads
- NewspaperAbove footer ads
Hi,
Unfortunately for pages you cannot place an ad automatically for all pages inside the content. You can place an ad in the page template but it will not show in the middle of the content. It can only be shown above or below the content.
try it like so:
1. Place an ad in custom ad spot 1 in your theme panel.
2. Use this shortcode:
<?php echo do_shortcode('[td_block_ad_box spot_id="custom_ad_1"]'); ?>
And place it in the page template you use. (there are 3 to choose from) I will show hgow to place it on the default one as it’s the most likely one to be used: http://screencast.com/t/2PK2i0Wnks3
Thank you!
Hi,
If you want to add it in the sidebar you will have to ask the plugin author for a method of implementing it into a wordpress sidebar. There is no simple way of adding a do_shortcode on a specific sidebar. This plugin is not tested so i cannot provide any official implementation methods. Ask the plugin author for a sidebar implementation guide. We have no idea of the plugin functionality and we cannot provide ni implementation methods. The one described above using do_shortcode will not work in a sidebar. it will work on post templates and inside the page content, but not on a sidebar. Except for the case in which the sidebar is added through visual composer on a split row. Then you can ad the shortcode inside the sidebar of that page, but not on a sidebar created in the widgets section of WP.
Thank you!
Hello,
If you want to target the section above the related articles, you can only do it from the theme code. http://screencast.com/t/y9s1aHCu1Abs
If you have a shortcode for the widget, you can use a do_shortcode function and place it like so:
http://screencast.com/t/fRhbWU9dk
You will have to make this modification in each of the post styles that you use. Each post style has it;s own file.
Thank you!
Hello,
Unfortunately there is no such ad spot in our theme. You can use a do_shortcode function if you want to place an ad above the post title like so:
http://screencast.com/t/1YskgRVuU7
Here is the code you need :
do_shortcode('[td_block_ad_box spot_id="custom_ad_1"]'); ?>
you will have to make this modification for all the post styles you want this to show up. Each post style has it’s own file.
Thank you!
Hi,
No, there is no header style with 2 ads. Each header style on our site has only 1 ad. If you require 2 ads, you can place an ad via the theme code. For header style 1 you can add an extra ad spot like so:
1. Place your ad in the custom ad spot 1 in the theme panel: http://screencast.com/t/6Wx1ttEH
2. Access your theme files via ftp and find this file: http://screencast.com/t/xvuHorAEdD
3. Add this code at the very bottom of the code:
<div class="custom_header_spot">
<?php echo do_shortcode('[td_block_ad_box spot_id="custom_ad_1"]'); ?>
</div>
example: http://screencast.com/t/Mhrr30iyP
4. Place this css in the theme panel -> custom css box:
.custom_header_spot{
margin: 24px auto 0 auto !important;
}
result: http://screencast.com/t/FO99YOj69r
Thank you!
I want to include the php code plugin reference WP Pro Advertising System in the home of my site, the code that the team plugin says that we must place it is <?php echo do_shortcode(“[pro_ad_display_adzone id=310]”); ?>, but I can not locate that file do,
http://wordpress-advertising.tunasite.com/docs/using-template-tag/
” The “template tag” is the solution to add adzones to places on your website where you can’t use shortcodes or widgets. It allows you to hard code the adzone into your theme files on the exact location where you want the adzone to be.
You can find the template tag for each adzone in the advertising menu under Adzones -> Get Code -> Template Tag.
Note: The template tag requires some PHP knowledge. It has to be added into your theme files so if you don’t know how to add the template tag contact your theme developer, provide him the template tag and ask where it should be added to show the adzone where you want it to be.”
No problem, I figured it out in the meantime. Maybe it’s of interest to anyone with the same problem: I added this to td_smart_list.php and call it in smart_list_8 (where I need it).
protected function callback_only_on_last_page() {
$current_page = $this->get_current_page($this->list_items);
$total_pages = count($this->list_items[‘list_items’]);
if ($current_page == $total_pages) {
// last page
$buffy .= do_shortcode(‘[SOMESHORTCODE]’);
}
else {
// not last page
$buffy .= ”;
}
return $buffy;
}
Hello Jan,
Maybe this topic will help:
https://forum.tagdiv.com/topic/article-bottom-ad-not-working-on-smart-lists/
You have to use $buffy .= do_shortcode('[td_block_ad_box spot_id="custom_ad_1"]');
Thanks.
problem solve 🙂
the code is:
<?php locate_template(‘parts/page-category-header.php’, true);?>
<?php
if (is_category (‘Artist’)) {
echo do_shortcode ( ‘ [td_block_11 category_id=”3993″ sort=”alphabetical_order”] ‘ );
}
else {
locate_template (‘loop.php’, true);
}
?>
thank you for your help
Thank you for your help.
i already insert:
<?php locate_template(‘parts/page-category-header.php’, true);?>
<?php
if (is_category (‘3993’) {
echo do_shortcode ( ‘ [sort=”alphabetical_order”] ‘ );
}
else {
locate_template (‘loop.php’, true);
}
?>
<?php echo td_page_generator::get_pagination(); ?>
but it doesn’t work. “Parse error: syntax error”
Hello,
Our theme category pages use the loop.php file to populate the page with posts. This is where you will have to modify the code.
There is an alternative though. You could try to use a block from Visual Composer. There you can use the block settings to sort your posts to your preferred sorting option.
After the block is set use do_shortcode function to echo out the shortcode on that category page. The code must be added in category.php page here: http://screencast.com/t/mIrs3SDaaFez
I hope this helps.
Hi Bogdan,
Thank you for the response. Yes, I know that the smart list template for the mobile theme is different, though it looks like smart-list 7. and as I wrote above in my reply that, I had also tried to include same code in “td_smart_list_mob_1.php”. Anyways,
I tried to put your code as shown in the image http://screencast.com/t/RtyOwKCaF, but unfortunately, it didn’t work. I again tried to by putting this code like this too ( as we did in do_shortcode option for desktop smart lists version ), but it didn’t work either 🙁
So, here is my two try:
1.
// render the pagination
$buffy .= $this->callback_render_pagination();
$buffy .= '</div>';
$buffy .= td_global_blocks::get_instance(‘td_block_ad_box_mob’)->render(array(‘spot_id’ => ‘content_bottom_mob’));
return $buffy;
}
2.
protected function render_after_list_wrap() {
$buffy = '';
$buffy .= '</div>'; // /.td_smart_list_1 wrapper with id
$buffy .= td_global_blocks::get_instance(‘td_block_ad_box_mob’)->render(array(‘spot_id’ => ‘content_bottom_mob’));
return $buffy;
}
}
What should I do now? Will you please try this.. as it can be really for many of us. Having a “bottom contextual article ads” from Outbrain, content.ad are a necessity these days, and we have 70% visitors on mobile. So…. please
Thank you…
Hello tycoonz Fitness,
Unfortunately, our theme has not been tested with this type of plugin and we have no idea about the theme behavior with this type of plugin and also, we cannot say for sure if it will work or not with the theme, sorry! I do not know where exactly you want to display the MailChimp of your website? Please notice that all the shortcode which is generated by the plugin you should add inside the post if you want to display it there or inside a Text Block and place it where you want inside your website. So, another alternative for you would be to use the do_shortcode method and place the plugin shortcode inside the core files, corresponding to desired places of your website. ->http://screencast.com/t/mZul6h66Cvu
For more information about this method, please consult the documentation here -> https://developer.wordpress.org/reference/functions/do_shortcode/
If you want to display more levels in our theme and if you are not aware of the steps which are needed to take in this regard, please consider hiring a freelancer/developer to help you because we cannot provide customization services at the moment, sorry!
Thanks for your understanding!
Hi,
So, I finally implemented the code in all smart list type and it’s working well. Though it’s not working on mobile ( with TD Mobile theme plugin ON)
So, I also added this code to “td_smart_list_mob_1.php” but since “custom_ad_1” can’t be recognized by Mobile theme hence it’s not working.
What we can do is to call for “Article Bottom Ad” under mobile theme option (https://i.imgur.com/8bkJGHf.png ) in spite of “Custom_Ad_1” . If it’s possible , please tell me the way or if there is some other way around.
One more thing- So, we already have the same code written in “Article Bottom Ad” section of theme setting panel ( https://i.imgur.com/el1PniV.png ) so, for the desktop version too, Can’t we use
“article_bottom_ad” in spite of “custom_ad_1” in following code:
$buffy .= do_shortcode('[td_block_ad_box spot_id="custom_ad_1"]');
Kindly assist.
Thank you.
Hi,
Smart lists will igonre inline ads as smart lists have a different implementation than normal posts. Smartlists have their own ads.
Here is an example from a different topic regarding smart list 6:
Smart lists have a specific ad spot in the theme panel but the smart list 6 ad will not position below the pagination. If you want it to show below the pagination, you will have to edit the theme files to do it as there is no option in the theme for it. You can use this code :
$buffy .= do_shortcode('[td_block_ad_box spot_id="custom_ad_1"]');
And place it like so: http://screencast.com/t/zvRezg4R8rva Then your ad from ‘custom ad 1’ spot will show below the pagination. Unfortunately this will not be a 970 width ad if you use a sidebar because if you do, the main content area is only 696 pixels wide. There can be a large 970 px banner only if you remove the sidebar.
You can adapt the method from smart list 6 to your smart list 1 in this file:
http://screencast.com/t/ke2gPSa65
I hope this helps.
Thank you!
Hello hemiargus,
If you want this adding to be automatically for each post, please notice that you will have to edit the td_module_single_base.php core file and with do_shortcode method you can add your Custom Ad Spot, like this -> http://screencast.com/t/jqDqmXvmV Please keep in mind that if you want to bring best results on tablets and mobile devices you will need to do some additional customizations with CSS. This is not a simple task and if you are not aware of the steps in this regard, please consider hiring a freelancer/developer to help you because we cannot provide custom work at the moment, sorry! Above, I gave you a possible way how could you do this.
Thanks for your understanding!
HI
By default the theme don’t have a similar option and to achieve that you need to edit td_module_single_base.php and concatenate a new ad-spot to post’s content: http://screencast.com/t/Fpt2vFDSg5T1 To get the shortcode add an ad box into a blank page then switch in back-end editor copy and paste this code: http://screencast.com/t/Kcqsjk9C7xbU inside do_shortcode function.
Note that you will also need some changes in post’s html and some css customizations for layout. Note that this is a complex task which involve many changes and tests in order to be achieved. For the moment we can’t offer customization services so if you really need this and you’re not aware of the steps that must be taken in this regard my advice is to look for someone who can help you with implementation or hire a developer to do it for you.
Thanks for your understanding!
HI
To display an ad above related article you need to edit the file corresponding with post template used and echo out a custom ad-spot. To get the shortcode add an ad box into a blank page then switch in back-end editor copy and paste this code: http://screencast.com/t/Kcqsjk9C7xbU inside do_shortcode function.
The code should look like here: http://screencast.com/t/uyT7fX4Rk
<?php echo do_shortcode('[td_block_ad_box spot_id="custom_ad_1"]'); ?>
Thanks!
Hi
To achieve that you will need some customization in theme’s core files. If the plugin generate shortcodes then you can use do_shortcode() function to achieve that: http://screencast.com/t/lJ4w3ayLi and for mobile here: http://screencast.com/t/NiQwXWenYrO
' . do_shortcode('shortcode-goes-here') . '
Note that the plugin is not tested and we can’t guarantee that it will work fine with Newspaper theme.
Thanks!
so I’ve added this:
$adcounter++;
if (is_category() && ($adcounter == 3)) {
echo do_shortcode('[td_block_ad_box spot_id="content_top"}');
}
but i don’t see a change.
HI
Try to insert the ad code in one of theme’s ad spots then add inside do_shortcode function the shortcode of that ad-spot.
Note that you may also need additional customization to make the ads work there. We can’t offer customization services for the moment, most we can do is to point a possible way to achieve that. As I’ve mentioned in my previews reply the code works fine on my end with a banner ad, I mean that the ad is clickable and works fine.
Thanks!
Thanks,
what I’ve done is to add these lines of code on the tail of header.php
?>
<div class="left">
<?php echo do_shortcode ('[cfAdZoneCode zoneid="21" zonename="0.1 skin"]') /* FV Change skin ad */ ?>
</div>
I’ve seen some changes in the new version, maybe this must be changed?
Hello,
Unfortunately pages cannot have an image outside of the content. They are a different matter altogether. I;m not even sure about the difference between the 2 images you pointed out. One is up next to the menu and the second one has a bit of padding. That’s all. You can add full width images on pages if you want by stretching the row and content like this example homepage: http://demo.tagdiv.com/newspaper_travel/
To do that simply create a row in visual composer and then select stretch row and content and then add an image to it like so: http://screencast.com/t/0N7logJP797
If you prefer the coding method, you will need to modify a page template. There are 3 page templates in our theme: http://screencast.com/t/5f6U6nfgw7
You can edti the page templates and add images as the category images like so:
<?php
if (is_page(13)) {
echo do_shortcode('[vc_row][vc_column][vc_single_image image="887"][/vc_column][/vc_row]')
}
elseif (is_page(14)){
echo do_shortcode('[vc_row][vc_column][vc_single_image image="886"][/vc_column][/vc_row]')
}
?>
I hope this helps.
Thank you!
Hello dineshj,
If you want to add another ad at your post page, please notice that you should use the do_shortcode() method for adding this. So, for example, if you are using the post template 1, you should edit the loop-single-1.php core file and add there this snippet of the code
<?php echo do_shortcode('[td_block_ad_box spot_id="custom_ad_1"]');?>, like this -> http://screencast.com/t/lbgwZwsa and the result you should see here -> http://screencast.com/t/5rMIpkZfbN
Also, please ensure that you have added your desired ad code in your Custom Ad 1 from the panel is you want to bring some results, like this -> http://screencast.com/t/j4No7tRvo
Hope this helps!
Thanks for your understanding!
HI
The theme does not have specific sort order options for category pages but as alternative you could try to use a block from Visual Composer. There you can use post id filter and the posts will be displayed in same exact order as the ids were insert in this filed: http://screencast.com/t/D0kCP1oc
After the block is set use do_shortcode function to echo out the shortcode on that category page. The code must be added in category.php page here: http://screencast.com/t/mIrs3SDaaFez
Hope this helps!
Thanks!