[Support request] Add widget at the top of a page

Home Forums Support [Support request] Add widget at the top of a page

Home Forums Support Add widget at the top of a page

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1860854
    Daniel

    Hi there,
    I have built a left sidbar with some widgets. Now I would like to have the sidebar at the top of my page like a “topbar”. Do you have a workaround for this?
    Thanks,
    Daniel

    #1860855
    David
    Staff
    Customer Support

    Hi there,

    why not use the Top Bar Widget area ?

    #1860860
    Daniel

    Hi David,
    thank you for your reply. Yes, I also tried the Top Bar Widget Area, but it’s above the secondary-navigation. For clarificatin: I would like to have the widget area at the top of my shop archive page.
    Thanks,
    Daniel

    #1860900
    David
    Staff
    Customer Support

    So if you want it immediately above the Shop archive, then you can create a Hook Element to add the sidebar into the shop archive.

    1. Create a new Hook Element:

    https://docs.generatepress.com/article/hooks-element-overview/

    a. Add this snippet to the element:

    <?php get_sidebar( 'right-sidebar'); ?>

    b. Select the Hook you want eg. woocommerce_arhive_description

    You can see the available Woo hooks here:

    https://www.businessbloomer.com/woocommerce-visual-hook-guide-archiveshopcat-page/

    c. Check the Execute PHP option.

    d. Set the Display Rules to: Product Archive and you can add other locations if required.

    2. Disable the Sidebar in Customizer > Layout > Woocommerce to it doesn’t output it in the default position as well.

    NOTE: The sidebar will load with it default styling which is a stack of widgets, it won’t convert them into a row. That will require some CSS.

    #1861304
    Daniel

    Hi David,
    I’ve followed your steps exactely, but it doesn’t work. No sidebar will be visible at the top of the shop page.
    Any ideas?
    Thanks a lot,
    Daniel

    #1861387
    Ying
    Staff
    Customer Support

    Hi Daniel,

    Any chance you can link us to the site in question?

    You can use the private information field.
    https://docs.generatepress.com/article/using-the-premium-support-forum/#private-information

    Let me know 🙂

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