Banner under the category top posts grid

Posted in: Newsmag
Post count: 69

Hi there,
I’m able to show an advertising banner (size 970×90) on my site homepage (please see http://screencast.com/t/ZlWAdGDr1sj) and I have obtained this behaviour by modifying the file “single.php” of my Newsmag child theme; I’ve added the following code snippet:


<div class="td-container">
        <div class="td-container-border">
                <div class="td-pb-row">
                <?php echo do_shortcode('[td_block_ad_box spot_id="custom_ad_1"]'); ?>
                </div>
        </div>
</div>

The custom_ad_1 ad_box contains the Google DFP tag code.
What I’m trying to do now is to show the same banner under every category
top posts grid which don’t have this banner at moment (please see http://screencast.com/t/X4fBKGQs8). How could I get it?
Tnx a lot for any appreciated help

Giuseppe

  • This topic was modified 10 years by gmaio.
Post count: 6535

Hi

You can achieve that by adding this line of code in category.php file like here: http://screencast.com/t/7MwqCqq8r7http://screencast.com/t/wkXZkqakqWqO

Let me know how it goes.
Thanks!

Post count: 69

Hi Andrei,
it works fine now 🙂 (i.e. http://43b.60a.myftpupload.com/category/sannio/).
Thank you very much!
Great job, as usual!
All the best,

Giuseppe

Post count: 69

Hi,
after my last Newsmag theme update, I’ve applied again the code modification you’ve suggested in order to display the 970×90 custom ad under the category post grird (please read the above reported previous thread exchanges. It worked perfectly until the last theme update: now, the same modification doesnt’ work anymore (please see the malfunctioning at http://43b.60a.myftpupload.com/category/sport/calcio/)
What I have to do to display that custom advertising ad_box in the desired space i.e. under the category’s post grid?
Thanks in advance for any help.
Giuseppe Maio

P.S: hereafter the code modification of the file Newsmag/category.php


<div class="td-container">
    <div class="td-container-border">

        <?php td_api_category_template::_helper_show_category_template() ?>
        <?php td_api_category_top_posts_style::_helper_show_category_top_posts_style() ?>
        <?php echo do_shortcode('[td_block_ad_box_spot_id="custom_ad_1"]'); ?> // GSM:Display AD BOX 1 under the top post grid

  • This reply was modified 10 years by gmaio.
  • This reply was modified 10 years by gmaio.
Post count: 6535

Hi

The shortcode that you provided is not correct: http://screencast.com/t/3SXqaSmVXG Please make sure that you added the code like here, clear all caches and test again

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

Thanks!

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

Hi Andrei,
thanks a lot, it was simply a type and struggled with it for some time…
Now it works again!
Thank you very much indeed.
Giuseppe

Post count: 2

Hi Andrei,
I have look into my category.php but I can’t find the <div class="td-container-border"> part.
I’m running Newspaper v 6.6.1

Need some assistance here. Thank you.

Post count: 6535

Hi

Newspaper theme don’t have td-container-border container in its source, you can place the code here: http://screencast.com/t/Th4g8LpeZLy

Thanks!

Post count: 2

I see.. ok thank you Andrei. I will try it!

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