Yes, that's correct. I added it in the header.php folder. But, this banner shows on every page. Now, I'd like another banner above a post. So thats why I asked in which folder I have to add the adsense code. You told me to put it in the content-single.php file. No I'd like to know where exactly in this file.
Ok, so far so good. At the homepage it works! But when I go to a post (single), the banner appears twice, in stead of 1 banner: https://screencast.com/t/PNsfdSWkb4
If so, please use this codes replace with all the codes you have before on header.php file:
<?php if( is_home() || is_front_page() ): ?>
<div class="penci-google-adsense" style="margin: 20px 0;">
put the codes here
</div>
<div class="penci-google-adsense" style="margin: 20px 0;">
put the codes here
</div>
<?php endif; ?>
<?php if( is_single() ): ?>
<div class="penci-google-adsense" style="margin: 20px 0;">
put the codes here
</div>
<?php endif; ?>
On the above code, one for 2 banners on the homepage, one for a banner on single posts page.
<?php if( is_home() || is_front_page() ): ?>
<div class="penci-google-adsense" style="margin: 20px 0;">
put the codes here
</div>
<?php endif; ?>
<?php if( is_single() ): ?>
<div class="penci-google-adsense" style="margin: 20px 0;">
put the codes here
</div>
<?php endif; ?>
Sure. I want to add 3 several banners under the menu. 1 at the homepage (done), 1 at posts (done), and 1 at pages https://screencast.com/t/1e2yqp5pX So thats the one that doesnt work yet.
Ofcourse I understand, but if there was space for the banner in the theme I didnt had to ask. It's a very important spot on the page, and the theme doesnt have it.. Can you please add it in the next update?
Therefore, I just paid an additional 60 dollars for the support. It's very import that you can help me with it.
Hi,
I refer to ticket #1333638
Last comment. Where can I add the code in the folder? The banner must be placed under the menu (just like at my homepage)
Kind regards,
Tim Nieuwpoort
Hi,
I see it already added on your site.
http://prntscr.com/ha5vx8
Best Regards,
PenciDesign
Yes, that's correct. I added it in the header.php folder. But, this banner shows on every page. Now, I'd like another banner above a post. So thats why I asked in which folder I have to add the adsense code. You told me to put it in the content-single.php file. No I'd like to know where exactly in this file.
Kind regards,
Tim Nieuwpoort
Hi,
Do you mean you want to put the banner at the same place ( under the menu ) for only a post OR all your posts?
Best Regards,
PenciDesign
Hi,
Yes, same place under the menu indeed, for all my posts.
Kind regards,
Tim Nieuwpoort
Hi,
If so, please put the code:
To header.php file - below the code I sent it for you before:
Best Regards,
PenciDesign
Ok, so far so good. At the homepage it works! But when I go to a post (single), the banner appears twice, in stead of 1 banner: https://screencast.com/t/PNsfdSWkb4
Hi,
Hmm, I think that you want to add more the banner.
If you want to add only a banner. You can remove the codes for the first banner - keep the codes I give you recent.
Best Regards,
PenciDesign
Hi,
I don't understand you :) I want a different banner showed on the homepage than above a single post. So, I have 2 different banners.
Do I have to paste both codes in here?
Hi,
If so, please use this codes replace with all the codes you have before on header.php file:
On the above code, one for 2 banners on the homepage, one for a banner on single posts page.
Let's replace with your banners.
Best Regards,
PenciDesign
Ok, thanks. But, I want 1 banner on the homepage (now there is place for 2 in your code), and 1 banner on a (single) post.
I deleted one in your code, but then my website crashed. Can you please sent me the code for 1 banner on the homepage en 1 for a (single) post.
Thank you
Hi,
If so, please use this code:
Best Regards,
PenciDesign
It works! Thank you so much! :)
And if I want another banner on a single page (not a post), what do I have to fill in for 'single'
Hi,
You need to fill posts ID to this code:
Example:
You can check this guide to know how to find post id of a post.
Best Regards,
PenciDesign
Hi,
Ok, thank you. But I want the same banner above ALL my pages (Pages, not posts).
Just like I have the same banner above all my posts.
Sure. I want to add 3 several banners under the menu. 1 at the homepage (done), 1 at posts (done), and 1 at pages https://screencast.com/t/1e2yqp5pX So thats the one that doesnt work yet.
Ofcourse I understand, but if there was space for the banner in the theme I didnt had to ask. It's a very important spot on the page, and the theme doesnt have it.. Can you please add it in the next update?
Therefore, I just paid an additional 60 dollars for the support. It's very import that you can help me with it.
Kind regards,
Tim Nieuwpoort