Join the Soledad Facebook Users Group here
for Share, assistance, discussion, and Updates related to Soledad WordPress Theme.

If you can't create a new ticket - you can send us an email via our contact form and we will get back to you.

Okay
  Public Ticket #1366952
Ref #1333638
Closed

Comments

  •  1
    tim-nieuwpoort started the conversation

    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

  •  2,701
    PenciDesign replied

    Hi,


    I see it already added on your site. 

    http://prntscr.com/ha5vx8


    Best Regards,

    PenciDesign

  •  1
    tim-nieuwpoort replied

    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

  •  2,701
    PenciDesign replied

    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

  •  1
    tim-nieuwpoort replied

    Hi,

    Yes, same place under the menu indeed, for all my posts.

    Kind regards,

    Tim Nieuwpoort

  •  2,701
    PenciDesign replied

    Hi,

    If so, please put the code:

    <?php if( is_single() ): ?>
    <div class="penci-google-adsense" style="margin: 20px 0;">
    put the codes here
    </div>
    <?php endif; ?>

    To header.php file - below the code I sent it for you before:

    <div class="penci-google-adsense" style="margin: 20px 0;">
    put your google adsense code here
    </div>

    Best Regards,

    PenciDesign

  •  1
    tim-nieuwpoort replied

    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

  •  2,701
    PenciDesign replied

    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

  •  1
    tim-nieuwpoort replied

    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?

    <?php if( is_single() ): ?>
    <div class="penci-google-adsense" style="margin: 20px 0;">
    put the codes here
    </div>
    <?php endif; ?>
  •  2,701
    PenciDesign replied

    Hi,

    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.

    Let's replace with your banners.

    Best Regards,

    PenciDesign

  •  1
    tim-nieuwpoort replied

    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

  •  2,701
    PenciDesign replied

    Hi,

    If so, please use this code:

    <?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; ?>

    Best Regards,

    PenciDesign

  •  1
    tim-nieuwpoort replied

    It works! Thank you so much! :)

  •  1
    tim-nieuwpoort replied

    And if I want another banner on a single page (not a post), what do I have to fill in for 'single'

    <?php endif; ?>
    <?php if( is_single() ): ?>
    <div class="penci-google-adsense" style="margin: 20px 0;">
    put the codes here
    </div>
  •  2,701
    PenciDesign replied

    Hi,

    You need to fill posts ID to this code:

    <?php if( is_single() ): ?>

    Example:

    <?php if( is_single('14') ): ?>

    You can check this guide to know how to find post id of a post.

    Best Regards,

    PenciDesign

  •  1
    tim-nieuwpoort replied

    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.

  •   PenciDesign replied privately
  •  1
    tim-nieuwpoort replied

    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

  •   PenciDesign replied privately