[Resolved] Adding widget above shop page

Home Forums Support [Resolved] Adding widget above shop page

Home Forums Support Adding widget above shop page

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #2357288
    Kaan

    Hi,

    We are using GP for our Woocommerce site. We are trying to change widgets on shop page;
    1) To add a new horizontal widget above product list on shop/archive pages
    2) To differentiate right sidebar widgets for shop page and blog page (to display product related widgets on shop page side bar and post related widgets on blog list page)

    For adding widgets on top (1) I tried your proposed solution on topic->https://generatepress.com/forums/topic/add-widget-at-the-top-of-a-page/#post-1860900 but this hook only adds right bar widget on top even if I change side-bar ID in the snippet (ie <?php get_sidebar( ‘left-sidebar’); ?>)
    I planned to use an unused widget such as Footer 4 or 5 and tried to display it on top but I think I am missing something.

    For (2) I could not find a way to use Elements for serving different widgets on shop and blog list pages. Our layout is content+sidebar for both pages.

    Could you please give me a direction for these customizations.

    Thanks,
    Kaan

    #2357351
    Fernando
    Customer Support

    Hi Kaan,

    For reference, can you provide the link to the page in question? We’ll take a look at how it looks like now.

    You may use the Private Information field for this: https://docs.generatepress.com/article/using-the-premium-support-forum/#private-information

    #2357402
    Kaan

    Hi Fernando,

    Thank you for your prompt reply.

    In the mean time, I have further worked on the issue. Now, I added widgets to right sidebar and via CSS I put them on the top for mobile. (So product filters are on the right on desktop, on the top on mobile) which is acceptable.
    You can check current page view at https://stage.coffeetropic.com/kahveler/

    What I need now is to differentiate right side bar widgets for blog list page. Since at the moment product filter widgets are displayed on blog page, too. I want to display different widgets for blog page.
    You can check blog page at https://stage.coffeetropic.com/blog/

    Thanks,
    Kaan

    #2357463
    Kaan

    Hi again,

    I have worked on blog page. I used left sidebar on blog page and via the same CSS trick I displayed left sidebar on the right on desktop and hide it on mobile. So using these workarounds I achieved different sidebars on shop and blog pages.

    However, it would still be good to be able to put different sidebars on shop and blog via theme settings. You may consider this improvement for your next releases.

    Best,
    Kaan

    #2358514
    Fernando
    Customer Support

    Hi Kaan,

    Doing so would be possible now. You’ll need to add the widgets through a Block Element – Hook. There are hooks:

    after_left_sidebar_content
    before_left_sidebar_content
    after_right_sidebar_content
    before_right_sidebar_content

    You can then set the Display rule of the Block Element so that it appears only on your preferred pages.

    Using a Block Element – Sidebar would be a possible solution as well so that it’s a totally different sidebar: https://docs.generatepress.com/article/block-element-sidebar/

    #2377469
    Kaan

    Thanks Fernando!
    I implemented using Block Elements -Hook and it was possible to differentiate sidebars in different pages.
    I mark this topic as resolved.

    #2378155
    Fernando
    Customer Support

    You’re welcome Kaan!

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