how i can move ARTICLE BOTTOM AD under social buttons? i want put the ad at the end of the article.
https://www.oralosai.it/come-guardare-gratis-il-trono-di-spade-online-stagione-8/
Hello Ducacordero,
You should edit the theme core files in order to make these changes. For example, if you are using the post template style 1 you should edit the loop-single-1.php core file and move the PHP code which writes the Articles bottom ad. -> https://www.screencast.com/t/ZIF09vskG8K
Thanks for your understanding!
if i’m using default template i need to edit loop-single?
<?php
/**
* The single post loop Default template
**/
if (have_posts()) {
the_post();
$td_mod_single = new td_module_single($post);
?>
<article id=”post-<?php echo $td_mod_single->post->ID;?>” class=”<?php echo join(‘ ‘, get_post_class());?>” <?php echo $td_mod_single->get_item_scope();?>>
<div class=”td-post-header”>
<?php echo $td_mod_single->get_category(); ?>
<header class=”td-post-title”>
<?php echo $td_mod_single->get_title();?>
<?php if (!empty($td_mod_single->td_post_theme_settings[‘td_subtitle’])) { ?>
<p class=”td-post-sub-title”><?php echo $td_mod_single->td_post_theme_settings[‘td_subtitle’];?></p>
<?php } ?>
<div class=”td-module-meta-info”>
<?php echo $td_mod_single->get_author();?>
<?php echo $td_mod_single->get_date(false);?>
<?php echo $td_mod_single->get_comments();?>
<?php echo $td_mod_single->get_views();?>
</div>
</header>
</div>
<?php echo $td_mod_single->get_social_sharing_top();?>
<div class=”td-post-content”>
<?php
// override the default featured image by the templates (single.php and home.php/index.php – blog loop)
if (!empty(td_global::$load_featured_img_from_template)) {
echo $td_mod_single->get_image(td_global::$load_featured_img_from_template);
} else {
echo $td_mod_single->get_image(‘td_696x0’);
}
?>
<?php echo $td_mod_single->get_content();?>
</div>
<footer>
<?php echo $td_mod_single->get_post_pagination();?>
<?php echo $td_mod_single->get_review();?>
<div class=”td-post-source-tags”>
<?php echo $td_mod_single->get_source_and_via();?>
<?php echo $td_mod_single->get_the_tags();?>
</div>
<?php echo $td_mod_single->get_social_sharing_bottom();?>
<?php echo $td_mod_single->get_next_prev_posts();?>
<?php echo $td_mod_single->get_author_box();?>
<?php echo $td_mod_single->get_item_scope_meta();?>
</footer>
</article> <!– /.post –>
<?php echo $td_mod_single->related_posts();?>
<?php
} else {
//no posts
echo td_page_generator::no_posts();
}
i don’t know what i need to change. can you do it for me? because is more easy for me copy and paste 😛
Hello Ducacordero,
For example, if you are using the post template style 1 you should edit the loop-single-1.php and add this code -> https://www.screencast.com/t/dZJqpgKOE Then, ensure that in the Custom Ad 1 have been added your AdCode like this -> https://www.screencast.com/t/Aa8kIJm3SKm Notice that if you will follow this advice, you should remove the Article Bottom Ad or disable it because to move this ad is not a simple task and require to make a lot of customizations. This is the simplest way in this case to use the do_shortcode method.
Thanks for the message!
can I do the same thing with the mobile version of the themplate?
-
This reply was modified 8 years by
Ducacordero.
Hi,
If you are not using the mobile theme plugin the desktop ad will remain in the same position.
This method will not work with the mobile theme plugin active, the shortcode will not be rendered. The mobile theme has ad settings of it’s own that you can use.
Thanks
i’ve update newspaper at latest version but now i cant find loop-single.php to insert this code:
<?php echo do_shortcode (‘[td_block_ad_box spot_id="custom_ad_4"]‘);?>
and show ARTICLE BOTTOM AD under social button.
what i have to do?
Hi,
Starting from theme update 9.7 most of the theme files were moved in the tagDiv composer plugin, so modifying them in a child theme is not possible anymore. They can only be modified there directly if this is required – http://prntscr.com/nvedxl but note that the modifications will be lost after a theme update when the plugins are updated as well.
Only the default post template remained in the main theme folder
– http://prntscr.com/nveeqf
However what you are trying to do is possible in a cloud post template. These templates can be edited/created with the composer, so placing an ad box element in the post template is an easy task. Also the post template elements can be re-positioned as needed.
These are cloud post templates made by us, but you can also create your own
– https://cloud.tagdiv.com/#/load/Single
– https://forum.tagdiv.com/tagdiv-cloud-library-plugin/
Thanks
Hi Simon, thanks for the reply. In fact, every time I updated the theme, I had to edit the file loop.single.php
I tried to do the same thing with the new update but the code is different from the usual and I don’t know where to put my hands.
I would like to know some things:
1) is it possible to modify the file loop.single.php with the cloud library plugin?
2) if it is not possible, how can I modify the file loop.single.php inside the theme folder? Where should I enter the code to show the custom ad 4 and what code should I enter?
Thanks in advance
Hi Simion, I tried to create a custom template with the cloud library plugin but it’s not good for me. Could you explain me how to edit the loop-single.php file considering I have to insert the custom ad 4? Thanks in advance
Hi,
1. The cloud library post template don’t have PHP files, these can be created in the composer like a page for example. So they don’t follow a predefined code structure like the default post templates do. The predefined templates can’t be edited with the composer, only in their PHP files.
The loop files of the predefined templates are in the tagDiv composer plugin, you could modify them there, just follow the highlighted directory path – https://prnt.sc/nvedxl
2. One loop single file remained in the theme folder, the default post template. But this will apply only if the tagDiv composer is not active, as a temporary post template basically, before the composer is activated. The actual post template default file is in the composer as well – http://prntscr.com/nvv7fi
So basically if you want to modify the predefined post template, you could do it in the composer plugin. Edit the template you want and modify it as you want.
If you have more questions let me know.
Thanks
Hi Simion, thank you for the reply. I’ve solve my problem by editing loop-single.php in td composer plugin