[Support request] Banner 728×90 not showing on certain pages.

Home Forums Support [Support request] Banner 728×90 not showing on certain pages.

Home Forums Support Banner 728×90 not showing on certain pages.

Viewing 15 posts - 1 through 15 (of 34 total)
  • Author
    Posts
  • #324601
    Terrell Jerry

    Hello Thomas,

    How do I get the banner to how up on the blog while using sections. I have the code to make the sidebar show up while using sections but I need a code for the 728×90 banner to show up in the inside content container and I don’t want it to show up on the home page.

    I look forward to your response.

    thanks,

    Jerry

    #324646
    Leo
    Staff
    Customer Support

    Hi Jerry,

    There are several GP hooks you might be able to use depending on where you want the banner:
    http://demo.generatepress.com/hook-locations/
    https://docs.generatepress.com/article/hooks-overview/

    Then use conditional tag to make it show up on that page only:
    https://codex.wordpress.org/Conditional_Tags#The_Main_Page

    Let me know if you need more info ๐Ÿ™‚

    #324663
    Terrell Jerry

    Hello Leo,

    I would like the banner to show up on the blog while using sections. I already have the code for it not to show up on the homepage but I want it to show on the blog and single post inside content container.

    thanks,

    Jerry

    #324664
    Leo
    Staff
    Customer Support

    Have you tried the inside content container hook shown above?

    How are you displaying blog using section currently? Can you link me to the page?

    #324673
    Terrell Jerry

    Everything is in the draft and private mode the site isn’t live yet but will be real soon. Just trying to make sure my banners are in place to collect emails.

    Yes, I’ll be using sections for the blog page to display all blog post.

    I currently have this code in the inside content container hook.

    thanks,

    Jerry

    #324674
    Terrell Jerry

    Sorry code :

    <?php if ( ! is_front_page() ) : ?><script data-oio-zone=”type=banner&zone=2&align=center&refresh=0″>
    (function(w,d,e,o,u,s,t){w[o]||(w[o]={},s=d.createElement(e),s.src=u,s.async=1,
    t=d.getElementsByTagName(e)[0],t.parentNode.insertBefore(s,t))})(window,document,
    “script”,”oiopub”,”http://zippsurge.com/wp-content/plugins/oiopub-direct/zones.js&#8221;);
    </script><?php endif; ?>

    #324675
    Leo
    Staff
    Customer Support

    The sections add-on actually won’t work for the blog page: https://generatepress.com/forums/topic/sections-in-posts-page/

    #324689
    Terrell Jerry

    So are you saying that my blog post summary will not show with sections activated.

    #324690
    Leo
    Staff
    Customer Support

    You won’t be able to activate Sections the main blog page.

    WordPress ignores all metaboxes on blog/archive and other index pages by default.

    An alternative is to use Tom’s WP Show Posts: https://wpshowposts.com/

    Then you can insert shortcode in Sections.

    #324691
    Terrell Jerry

    Okay, I understand that. What I’m trying to make my banner 728×90 show up on the blog and when you click the blog post. Will the banner show up while using sections on the blog tab.

    I show you an example below.

    http://www.johnchow.com/blog/

    See how John 728×90 banner shows up without the blog text image showing up. When you use sections on the blog page that blog text dosen’t show.

    It looks like he created a blue banner with the white text Blog. But in wordpress that text shows up twice when I have a banner like John.

    When I activate sections that secound blog text goes away.

    thanks,

    Jerry

    #324692
    Leo
    Staff
    Customer Support

    Sounds like you need two conditionals – one for the main blog page and one for single posts:
    https://codex.wordpress.org/Conditional_Tags#The_Main_Page
    https://codex.wordpress.org/Conditional_Tags#A_Single_Post_Page

    When Sections is activated, the layout of the page is wiped clean as it acts like a page builder.

    If you can put your site up on a temporary server it would be much easier for me to see whats’ going on ๐Ÿ™‚

    #324695
    Terrell Jerry

    I can add you as a user if that would work Leo.

    #324701
    Tom
    Lead Developer
    Lead Developer

    Have you tried this?:

    add_action( 'generate_before_main_content','tu_blog_banner' );
    function tu_blog_banner() {
        if ( is_home() || is_single() ) {
        ?>
            Your banner in here
        <?php
        }
    }
    #324722
    Terrell Jerry

    Do I put this as snippet then activate it or where do it go.

    #324723
    Leo
    Staff
    Customer Support
Viewing 15 posts - 1 through 15 (of 34 total)
  • You must be logged in to reply to this topic.