- NewsmagAbove footer ads
- NewsmagSmart list ads
- NewsmagArticle ads
- NewsmagSidebar ads
- NewsmagHeader ads
Hi, Yes, I am aware of the additional plugins but as you said, post navigation appears in the footer of the post, just after the post bottom ad ,
I want it to appear before the post bottom ad, where should I move the “get_post_pagination’ code so that it can appear before bottom ad, not after it.
Because even if I move the additional plugin codes between pagination and end of the post, it will still appear after ‘content bottom ad’ and in my case, content bottom ad is a native ad and it is creating a big gap there.
If there is no way to move ‘post-pagination’ code before ‘content-bottom ad’, kindly instruct me this ‘do_shortcode’ method to achieve the same result.
Thank you so much.
Hi,
The post navigation appears in the footer of the post, just after the post bottom ad – https://www.screencast.com/t/Bob6S10f66kr but in your case I see that additional plugins have inserted their content in the post content and pushed the pagination down. You should try if possible to change the display position of these plugins so they are no longer part of the post content. Or implement your bottom ad through a do_shortcode after the post pagination in the structure of the corresponding loop single file to your post template style – https://www.screencast.com/t/u4MER2tSev5Y
Thanks
Hello,
This depends on whether the plugin has a shortcode integration or not. If it has a shortcode implementation then use the plugin shortcode inside a do_shortcode function of WP like so:
<?php echo do_shortcode ('your plugin shortcode here'); ?>
And place the function in the loop-single files or the single-tempalte files: https://www.screencast.com/t/WYWW3iNx8 depending on where the get_title function is called. Then you can place the code above the get_title code.
Thank you!
Hello Rony123456,
It seems that your shortcode is not good. try the code below and place it in the core files. The code is ->
<?php echo do_shortcode ('[td_block_ad_box spot_id="custom_ad_1" tdc_css=""]'); ?>
The result is here-> https://www.screencast.com/t/sT9WlnBla4d
Hope this helps and let us know how it goes!
Thanks for the message!
Hi,
Maybe I am misunderstanding what you were asking. I believe you wanted to have an ad title on a custom ad that you are going to manually insert in the structure of the loop single file corresponding to the post template – https://www.screencast.com/t/5f6s5Rs1 with a code like this example and this result – https://www.screencast.com/t/1Oum1O8l
<?php echo do_shortcode ('[td_block_ad_box spot_id="custom_ad_1" spot_title="ad title" tdc_css=""]'); ?>
Thanks
Hi,
That is a simple page I created in Visual composer – https://www.screencast.com/t/R421IGscrrfv in which I inserted an Ad box element then set an adspot and a title – https://www.screencast.com/t/Os3b1iHh After that you can use this ad box code in your do_shortcode – https://www.screencast.com/t/i66u24neem – https://www.screencast.com/t/LljjINnxTcq You can use a different custom ad if you want.
Thanks
I have come up with a temporary fix by using CSS relative positioning on lines 41, 42 (Added style to those two lines) and 43 (Added a div with style attribute):
<input type="button" name="login_button" id="login_button" class="wpb_button btn td-login-button" style="position:relative; bottom:25px;" value="' . __td('Login', TD_THEME_NAME) . '">
<div class="td-login-info-text" style="position:relative; bottom:25px;"><a href="#">' . __td('Forgot your password? Get help', TD_THEME_NAME) . '</a><BR />'.do_shortcode('[apsl-login-lite]').'</div>
<div style="position:relative; bottom:45px;">' . $users_can_register_link . '</div>
This should only be a temporary fix until I can get a response. As we all know, relative positioning isn’t good to use.
-
This reply was modified 9 years by
tomashley.
I followed the instructions of the user kautukbhatnagar from here: https://forum.tagdiv.com/topic/want-social-login-short-code-on-login-page/ using AccessPress Social Login Lite. It works great and the social login buttons show where they’re supposed to but the problem is that it causes the “Create an Account” button to be pushed down out of display.
Is there a way I can move everything (Such as the login button) up some or increase the height of the modal (Or both)? Here’s what my modal looks like:

Here’s what line 42 of td-login-modal.php looks like:
<div class="td-login-info-text">' . __td('Forgot your password? Get help', TD_THEME_NAME) . '<BR />'.do_shortcode('[apsl-login-lite]').'</div>
Hello Rony123456,
I have checked your code above and I noticed that it is not correct. You forgot the latest square bracket. Try the following code ->
<?php echo do_shortcode ('[td_ad_box spot_id="custom_ad_1"]'); ?>
Hope this helps and let us know how it goes!
Thanks for the message!
-
This reply was modified 9 years by
Alin [tagDiv].
-
This reply was modified 9 years by
Alin [tagDiv].
Hello giahancute2013,
Unfortunately, our theme does not have any such an option for it, sorry! If you want to use our Blocks or Big Grids for the Woocommerce template, you should edit the theme core files where this template is created and add there, using the do_shortcode method and add there what items you want. -> https://www.screencast.com/t/NnutJaAQyZ4 For more information about this method, please consult here -> https://developer.wordpress.org/reference/functions/do_shortcode/ After you will load these elements in your Woocommerce page, notice that you will need for some adjustments if you want to bring best results. The theme has not been tested with these 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 custom work at the moment, sorry!
Thanks for the message!
Hello,
I am trying to add the following code after updating from 7.i to 7.7, but it doesn’t work.
<?php echo do_shortcode (‘[td_ad_box spot_id=”custom_ad_1″‘); ?>
It just shows on the page “[td_ad_box spot_id=”custom_ad_1”
Any ideas?
Hi,
The easiest way of achieving this is to remove your article bottom ad and use a do_shortcode with a custom ad, by editing the corresponding loop-single file found in the theme folder – https://www.screencast.com/t/zO7NsDOfV3yw to your post template style used.
For example if you are using post template 3 you must edit loop-single-3.php Then in the loop single code – https://www.screencast.com/t/UzcBqq2O0hF insert the do shortcode provided below – https://www.screencast.com/t/IsVdYBV6b1 You can use any of the custom ads available – https://www.screencast.com/t/lfePgI8yj just remember to change the code accordingly
<?php echo do_shortcode('[td_block_ad_box spot_id="custom_ad_1"]');?>
Result is like this – https://www.screencast.com/t/aDiwWJkjJ
Thanks
Hello,
Unfortunately there is no simple way of adding the article top ad above as you require it. You will have to use a custom ad placed in the theme files as the spot above the sharing and category tag is outside the main content. The article top ad is a content ad. It cannot show outside of the main content. Here is an example of how you can get an ad above the category tag.
You will have to edit each post template as each of the 12 post styles has it’s own file:
https://www.screencast.com/t/WSR6WEHU9
Use this code and place an ad in the theme panel-> custom ad 1 spot
<?php echo do_shortcode('[td_block_ad_box spot_id="custom_ad_1"]');?>
Thank you!
Hey Bogdan,
Thank you, that helped. One more question I hope you can help me with. I want the same set of share buttons above my pages as i have above the posts. I found this line of code in loop-single8.php that calls for them:
<?php echo $td_mod_single->get_social_sharing_top();?>
How do I integrate this into my page-pagebuilder-title.php? I already managed to add a Facebook share, but I would also like to call this whole set of share buttons. I tried several things, but my content just dissapears whatever I try, so I’m doing something wrong. What would be the right code to add?
Code now:
<?php while ( have_posts() ) : the_post(); ?>
<div class="td-main-content-wrap td-main-page-wrap">
<div class="td-container tdc-content-wrap">
<div class="td-page-header td-container">
<div class="td-crumb-container">
<?php echo td_page_generator::get_page_breadcrumbs(get_the_title()); ?>
</div>
<h1 class="entry-title td-page-title">
<span><?php the_title() ?></span>
</h1>
<?php echo do_shortcode('[vc_row][vc_column][vc_facebook][/vc_column][/vc_row]'); ?>
</div>
<?php the_content(); ?>
</div>
<?php
if($td_enable_or_disable_page_comments == 'show_comments') {
?>
<div class="td-container">
<div class="td-pb-row">
<div class="td-pb-span12">
<?php comments_template('', true); ?>
</div>
</div>
</div>
<?php
}
?>
Hello pedroarmindo1,
If you want to use this shortcode on posts, you should simply use it, without PHP tag and do_shortcode method because the WordPress will render it, like this -> https://www.screencast.com/t/KJh1jdJwqSC
Thanks for your understanding!
Hey guys,
I’m trying to get the facebook like button on my pages using VC shortcode. I want to get the button under the title of my page and above the content, except on the home page. I’m just dipping my toes in editing templates, so I could use a bit of help. When I edit the page.php file, I ONLY get the like box on the home page but nowhere else.
if (have_posts()) { ?>
<?php while ( have_posts() ) : the_post(); ?>
<div class="td-main-content-wrap td-main-page-wrap">
<div class="td-container">
<?php echo do_shortcode('[vc_row][vc_column][vc_facebook][/vc_column][/vc_row]'); ?>
<?php the_content(); ?>
</div>
<?php
if($td_enable_or_disable_page_comments == 'show_comments') {
?>
<div class="td-container">
<div class="td-pb-row">
<div class="td-pb-span12">
<?php comments_template('', true); ?>
</div>
</div>
</div>
<?php
}
?>
I would guess it is because of the (have_posts) part. How do I get the button to display only on the pages that do not have posts? I hope you can give me some tips. It would be of great help. Thanks!
<?php
if (in_category(array(‘salute’))){
echo do_shortcode(‘[td_block_ad_box spot_id="custom_ad_1"]‘);
}
else{
locate_template(‘parts/header/ads.php’, true);
}
?>
Use header-style-7, and with this code works fine.
-
This reply was modified 9 years by
giulian curl.
Hello Shawn,
If you want to add more code in our theme, you should use the do_shortcode method and place it every want on the website. For example, the snippet of the code which you should add the theme core files should look like this ->
<?php echo do_shortcode('[td_block_15 custom_title=”Related News” category_id=”Related category id” limit=”10″ ajax_pagination=”load_more”]');?>
For more references about this methods, please consult the guide here -> https://developer.wordpress.org/reference/functions/do_shortcode/
If is not what you mean or if you have a certain section where you want to add your code, please provide more details so I will be able to provide a more accurate response.
Thanks for the message!
Hello giulian curl,
Unfortunately, our theme does not have any such an option for this, sorry! If you want to add them you should do it yourself because these tasks involve custom work and we cannot provide this type of services at the moment, sorry! If you want to do this, as a hint, you should edit the category templates and add there every ad you want, using the do_shortcode method. For more references in this regard, you can consult our topic here -> https://forum.tagdiv.com/topic/different-header-ads-according-to-category/page/2/
Also, if you do not have a solid coding skills 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!
Thanks for your understanding!
Hi,
You could use do_shortcode with the code coresponding to those elements from Visual composer – https://www.screencast.com/t/Ya0GDv10Qtxc – https://www.screencast.com/t/VZCJIclofY and adding it in the code, after pagination – https://www.screencast.com/t/zo3RjyNO but it is not guaranteed that these elements will work properly in this situation
<?php echo do_shortcode('insert code here');?>
Result – https://www.screencast.com/t/nWPqcnkmD4
Thanks
Hello dharma3d,
Unfortunately, our theme does not have any such an option for it, sorry! You should edit the theme core file corresponding to post template used by you. For example, if you are using the post template default, you should use the do_shortcode method and place the Ad (you can use the Custom Ad 1) as you want. The required code which has to be added is here -> <?php echo do_shortcode('[td_block_ad_box spot_id="custom_ad_1"]');?> As a suggestion, you can see here -> https://www.screencast.com/t/O6TEOdIy
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 custom work at the moment, sorry!
Thanks for the message!
Thank you for your response Luclan, and Happy Unification day.
Ads Configuration:

Ad.php Code:
<div class="td-header-rec-wrap">
<?php
$tds_header_ad_title = td_util::get_option('tds_header_ad_title');
// show the header ad spot
if (is_category('Food')){
echo do_shortcode('[td_block_ad_box spot_id="custom_ad_1"]');
}
echo td_global_blocks::get_instance('td_block_ad_box')->render(array('spot_id' => 'header', 'spot_title' => $tds_header_ad_title)); ?>
</div>
Thank you in advance.
Hello;
Is this code wrong?
<?php echo do_shortcode('[td_block_ad_box spot_id="custom_ad_2"]');?>
here http://www.awesomescreenshot.com/image/2070258/d9102c27f3fb9b9a031ee8e932c1f3e6 that is how i added it and then i place this <?php echo do_shortcode('[td_block_ad_box spot_id="custom_ad_2"]');?> in single-loop.php