• Hi,

    I wonder how to add banner from adsense (responsive) after 3rd paragraph on every post?

    Currently I have banner fixed inside single.php but don’t know if I need to add some code to functions.php

    thank you.

Viewing 4 replies - 1 through 4 (of 4 total)
  • @virmodrosti
    some questions:
    1) How to you have inserted your post?
    2) Do you use any Page builder?
    3) Which theme you have used?
    May be i will do that using custom code or Using Theme feature.

    One suggestion: When you have inserted you post data you can entry your add manually after 3 paragraph in every post. Using WordPress dashboard.

    Thanks

    I wonder how to add banner from adsense (responsive) after 3rd paragraph on every post?

    If you don’t mind using a plugin, most of the banner ad management plugins have advance placement options, including inserting ads after nth paragraph of every post.

    https://www.ads-software.com/plugins/ad-inserter/

    https://www.ads-software.com/plugins/advanced-ads/

    https://www.ads-software.com/plugins/quick-adsense-reloaded/

    Thread Starter virmodrosti

    (@virmodrosti)

    This is my code in single.php:

    <?php get_header(); ?>

    <!– Begin Content –>

    <div id=”content”>

    <?php if (have_posts()) : ?>
    <?php while (have_posts()) : the_post(); ?><?php if(function_exists(‘wp_print’)) { print_link(); } ?>
    <div class=”post”>
    <div class=”p-heading”><h1><?php the_title(); ?></h1></div>
    <div class=”p-content”>
    <?php the_content(); ?>
    <?php wp_link_pages(array(‘before’ => ‘<p>Pages: ‘, ‘after’ => ‘</p>’, ‘next_or_number’ => ‘number’)); ?>
    <?php the_tags( ‘<p>Tags: ‘, ‘, ‘, ‘</p>’); ?>
    <?php edit_post_link(‘Edit this entry.’, ‘<p>’, ‘</p>’); ?>
    <script async src=”//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js”></script>
    <!– Responsive Ad –>
    MY RESPONSIVE CODE
    </script>
    </div>
    <div class=”p-info”><?php the_time(‘j.m.Y’) ?> | <?php the_category(‘, ‘); ?></div>
    </div>

    <div id=”content-a”>

    Currently I have set code under all paragraphs at the end of each post, which is easy just add fixed code inside, but I would like if possible to add code without using any plugins to have under 3rd paragraph on each post.

    @virmodrosti

    Yes, I hope possible. First filter the 3rd paragraph from every content then you should conditionally set your add Script.

    Thanks

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How to add banner under 3rd paragraph on every post?’ is closed to new replies.