[Support request] GP Header does not work on Woo shop Page.

Home Forums Support [Support request] GP Header does not work on Woo shop Page.

Home Forums Support GP Header does not work on Woo shop Page.

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #628579
    Max

    Tom

    So I am not chasing my tail. Can you please confirm that the GP Headers function (where you select a header in Layout box in edit view) does not work for the Woocommerce shop page.

    Thanks

    GeneratePress 2.1.3
    GP Premium 1.6.2
    #628590
    David
    Staff
    Customer Support

    Thats correct, you need to assign one in the Global Locations > Archives > Products.
    Same goes for any archive pages.

    #628604
    Max

    No you can add headers to the woo category pages from the Layout box in edit page. But not possible on shop page.

    #628609
    David
    Staff
    Customer Support

    My bad, yes Tom added the function for Woo categories but you’re general blog and shop page has to be done via global locations.

    #628614
    Max

    There is another problem here.

    If I add a custom header to the Woo shop in global settings it appears when I do a search that returns products.
    However it does not appear when you do a search and the return is no products found.

    And I have checked and that file path and it is the same product-archive.php template file in both instances.

    How can we fix this?

    #628621
    David
    Staff
    Customer Support

    I generally add a Page Header to the Search Results in Global Locations. My experience is search results don’t normally grab the shop page header.

    #628667
    Max

    There is an issue here. A bug that need some attention unless I am getting things wrong. Which is more often than not….

    I need to add a header to my Woo search results.

    Sure if I set that header in the Global Search drop down it will appear in my woo searches.

    But the problem is it will also appear in my Blog searches…which is not right.

    The Search Global header settings currently adds the selected header to both the woo archive-product.php template and to the WP search.php template.

    The header I want to use for my woo searches is not suitable to appear at the top of my wp searches.

    How can I set a header at the top of my woo searches only?

    #628737
    Leo
    Staff
    Customer Support

    Can you check with WooCommerce to see if there is a specific template tag for WooCommerce search results page we can use? I tried to look around but not seeing it.

    Then we can use this filter:
    https://docs.generatepress.com/article/generate_page_header_id/

    Let us know 🙂

    #628744
    Max

    The search results page is the archive-product.php template?

    if ( is_shop() ) {

    or

    if ( is_search() ) {

    #628761
    Leo
    Staff
    Customer Support

    Definitely doesn’t hurt to test. Or try a combination of both?

    Or maybe something like is_woocommece() && is_search()?

    Worth checking with their support.

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