Custom Ad

Posted in: Newsmag
Post count: 14

Hello

I just need some help here. I would like to place a tag into my posts pages. Where and which line of code would I need to locate for this. Here is an example of where I would like the sponsored ad to go, which is at the end of posts and above the comments.

http://cl.ly/image/0D0Q2N0K1o2R?_ga=1.171775460.519353559.1432221874

Thanks

Post count: 9544

You can add it at bottom of your single-loop.php template, or bottom of the post template you’re using.

For example I use loop-single-2.php for my default post template, along with single_template_2.php …

I moved the categories to right above my tags with a line break as they conflicted with Google News scraping the headline, but I did want them on the page.

SO, you could easily insert a shortcode your your HTML in that spot, such as here:

<?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();?>
[ your custom code ]
</footer>

<?php echo $td_mod_single->related_posts();?>

[ your custom code ]

Post count: 14

Oh, Thanks. I completely forgot what post type I was using, and thats why I couldn’t find it. Thanks very much for your help

Post count: 45

Hi, Chris S,
I want to insert ads (adsense)

1. Under Title of posts

2. Homepage

Show me how. Thank you!

Post count: 6535

Hi

You can insert an ad under post title using do_shortcode function in the file corresponding with post template used, like here: http://screencast.com/t/sOX6p9gHJ

<?php echo do_shortcode('[td_block_ad_box spot_id="custom_ad_1"]'); ?>

To get the shortcode add an ad box into a blank page then switch in backend editor copy and paste this code: http://screencast.com/t/Kcqsjk9C7xbU inside do_shortcode function.
For homepage you can use the adbox clock from Visual Composer like here: http://screencast.com/t/0kTjlWwwghttp://screencast.com/t/USSisJGc

Hope this help!
Thanks!

  • This reply was modified 10 years by Andrei L..
Post count: 45

Thank you so much Andrei L.,

I used “travel template”, can guide me which number template ?

Post count: 45

I inserted adsense code in “Aritcle bottom ad” but it doesn’t working corectly, result:
http://www.screencast.com/users/livingnomads/folders/Default/media/4cd155ff-8078-4219-9828-2cd6f2ff9e19

I want to ad show in content of article (above “Related article).

P/s: I used ” Travel Template”

Thank you!

Post count: 6535

Hi

The theme wasn’t designed to display ads under the post title so to achieve that you need to edit the theme files and add the indicated code. To display an ad under post title you can use one of the custom ads as I did in above example: http://screencast.com/t/sOX6p9gHJ The result will be like here: http://screencast.com/t/VJTTXjIrWQLn
Please consider that any customization require basic coding skills and if you can’t do it yourself my advice is to find someone who can help you with this. I can only point you to the right direction, but I can’t implement any customization for you.

Thanks!

Post count: 45

Ok, thank you so much Andrei L. I know your guide, I used “Travel Template”, so you can show me the name of .php file (loop-single-1.php, or loop-single-2.php….???), plz show exactly number ??

Post count: 6535

Hi

There is no specific file for travel template, because that referees at the pages. The file you need to edit must referees at post template used. For example if you’re using post template 3 for your post: http://screencast.com/t/5PdKqXFq the file that must be modified is loop-single-3.php

Thanks!

Post count: 45

Thank for your guide. I’ve used “From Panel”, I’m not specific any template, so what’s the file name I should use? Or I must specific a template ?

Post count: 45

I found it. I used Default Template, so what’s template I can insert ads correctly?

Thank you!

Post count: 6535

Hi

For default template the file that must be edited is loop-single.php like here: http://screencast.com/t/HPc31RRZ

Thanks!

Post count: 45

Thank Andrei for your support!

Viewing 14 posts - 1 through 14 (of 14 total)
You must be logged in to reply to this topic.