[Resolved] Page Header Addon Not Working On WooCommerce Pages

Home Forums Support Page Header Addon Not Working On WooCommerce Pages

Viewing 15 posts - 1 through 15 (of 27 total)
  • Author
    Posts
  • #102394
    Zoe

    Hi there

    I try page header addon on regular pages and it works perfectly. But it’s not working on WooCommerce pages such like – Shop, Cart and Checkout pages.

    Is it possible to use page header addon function on pages created by WooCommerce?

    #102397
    Zoe

    I test page header addon again on WooCommerce pages. It’s working on Cart and Checkout pages.

    But not on Shop page.

    #102444
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    WooCommerce unfortunately treats the Shop index page like the WordPress blog index page, thus ignoring any saved metabox values from editing that page – pretty frustrating.

    There is a work-around if you’re willing to use GP Hooks though.

    We can target the shop page using this conditional: is_shop()

    So, if you wanted to add an image below the header on the shop page, you would go into “Appearance > GP Hooks” and add something like this to the “After Header” hook:

    <?php if ( function_exists( 'is_shop' ) ) : ?>
          <?php if ( is_shop() ) : ?>
                <div class="page-header-image grid-container grid-parent generate-page-header"><img src="THE URL TO YOUR IMAGE HERE" alt="" /></div>
          <?php endif; ?>
    <?php endif; ?>

    If you need more info just let me know 🙂

    #102475
    Zoe

    Hi Tom

    When I activate GP Hooks, it adds more queries (around 20 queries). It hurts page load time.

    At Genesis, I always use “Genesis Simple Hooks”. Interesting – it doesn’t cause lots of queries like GP Hooks.

    GP Hooks can achieve lots of things. Mesmerizing. That’s the steroid for GP. Impressive addon. I’d love to use it in heartbeat. That’s why I purchased GP Premium without thinking twice.

    But I’m still worrying to use GP Hooks.

    #102508
    Tom
    Lead Developer
    Lead Developer

    Those queries are the hooks being called on the page – I’m working on reducing them.

    For now, go to “Appearance > GP Hooks” and hit the save button – it will reduce the amount of calls dramatically.

    That being said, each of those queries are called in 0.0002 of a second – so you don’t really have to worry about them.

    #102511
    Zoe

    Thanks Tom. I hope you achieve it soon. Appreciate for your suggestion.

    I believe, in very near future, GP will definitely shake big ‘ol Genesis.

    #102557
    Tom
    Lead Developer
    Lead Developer

    Let me know if that suggestion works for you or not 🙂

    #102583
    Zoe

    Yes. It works. Thank you so much Tom!

    It’d be better if I don’t need to add HTML to get there. 🙂 But, hey, it just for Shop page only.

    Please help me to check I’m doing right way.

    Here’s what I add into “After Header” –

    <?php if (function_exists( ‘is_shop’)): ?>
    <?php if (is_shop()): ?>

    <h2 style=”color: #fff; font-weight: bold; padding-bottom: 10px; padding-top: 30px; text-align: center;”>Welcome Blah Blah Blah…</h2>

    <?php endif; ?>
    <?php endif; ?>

    I took screenshot the result –

    http://prntscr.com/6yjwjm

    One more question. What do I have do if I want to add similar page header on “Single Product Page”?

    #102645
    Tom
    Lead Developer
    Lead Developer

    Yea, it’s kind of a pain. It’s why I had to create the menu for the blog page header (Appearance > Blog Page Header). Of course, I can’t anticipate every plugin and add an area for it.

    Your code got kind of jumbled, but by the looks of the screenshot it looks like it’s working.

    As for the single product, you should find the Page Header metabox while editing those products.

    Let me know 🙂

    #102753
    Zoe

    Thanks Tom.

    Would it be possible to display “fluid container type” page header on single post?

    #102808
    Tom
    Lead Developer
    Lead Developer

    Absolutely – there should be a “Container type” option in the “Content” tab.

    Let me know 🙂

    #102814
    Zoe

    Yep. I notice there is an option to choose between two container types.

    But, the fluid container is not displaying under menu bar.

    I took screenshot for you to look at it.

    http://prntscr.com/6yt5tg

    #102820
    Tom
    Lead Developer
    Lead Developer

    Looks like your Page Header location is set to display inside the content in “Appearance > Customize > Page Header”.

    Let me know 🙂

    #102825
    Zoe

    Voilaaaaa. YESSSS.

    All is well!

    I think I’m falling in love with GP. On the other hand, don’t want to leave Genesis.

    Gosh. What should I do? You make me crazy. 🙂 I wish I didn’t meet GP two months ago.

    #102826
    Tom
    Lead Developer
    Lead Developer

    Ha! If there’s anything about Genesis you like that GP doesn’t have, definitely let me know 🙂

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