Home User profile
tagDiv Member
This user did not write anything. So we are just showing here some random text to make the profile page look nice :)
Ducacordero
tagDiv Member

Hi Simion, thank you for the reply. I’ve solve my problem by editing loop-single.php in td composer plugin

Ducacordero
tagDiv Member

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

Ducacordero
tagDiv Member

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

Ducacordero
tagDiv Member

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?

Ducacordero
tagDiv Member

Hi itkhoj, you have to go in wordpress > Newspaper > AMP > Analytics and remove code from there.

Now, you open your FTP software (i use FileZilla) and you go to: /wp-content/plugins/td-amp/templates and open “html-start.php”

copy this at line 18 under “style”: <script async custom-element=”amp-analytics” src=”https://cdn.ampproject.org/v0/amp-analytics-0.1.js”></script&gt;

copy this at line 23 under “body”:

<amp-analytics type=”gtag” data-credentials=”include”>
<script type=”application/json”>
{
“vars” : {
“gtag_id”: “INSERT YOUR ANALYTICS ID”,
“config” : {
“INSERT YOUR ANALYTICS ID”: { “groups”: “default” }
}
}
}
</script>
</amp-analytics>

Where you see “INSERT YOUR ANALYTICS ID” you have to write your analytics code. CLOSE AND SAVE FILE

My html-start is like this:
html-start

Ducacordero
tagDiv Member

can I do the same thing with the mobile version of the themplate?

Ducacordero
tagDiv Member

Thank you Catalin now it’s work

Ducacordero
tagDiv Member

i don’t know what i need to change. can you do it for me? because is more easy for me copy and paste 😛

Ducacordero
tagDiv Member

<?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();
}

Ducacordero
tagDiv Member

if i’m using default template i need to edit loop-single?

Viewing 10 posts - 1 through 10 (of 10 total)