Premium support

Please log in to post in these forums. If you didn't create an account when you purchased, please contact us.

Free support

If you haven't purchased GP Premium, support for the free theme can be found on WordPress.org.

[Resolved] Disable search widget

Home Forums Support Disable search widget

Tagged: 

This topic contains 9 replies, has 3 voices, and was last updated by  Leo 5 days, 20 hours ago.

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

    I think this is more a general question about the search widget (and also archive widget).

    If there are none widgets in the right sidebar, by default WordPress shows the search widget and archive widget?

    I have a site with different category pages. On one page (Tutorials) I don’t want any widget been shown. I use a plugin to disable the widgets on that category page, but it still shows the search and archive widget…

    So maybe I have to ask the plugin developer, but for my understanding is it correct that the search and archive widget is always shown, unless nothing is in the right sidebar?

    GeneratePress 2.0
    #444374

    Leo
    Staff

    Hi there,

    That’s actually a GP default which we might change in the future.

    They are there to fill the space when sidebar layout is selected but no widgets added.

    We can use CSS to hide the sidebar on the page you don’t want it though. Can you link me to it?

    Thanks!

    Want to help support GP? Please consider leaving us a review!
    https://wordpress.org/support/theme/generatepress/reviews

    #446763

    Hi Leo,

    Ok, thought it was WP default 🙂

    This is the category page in wich I don’t want to show sidebars.

    FYI this is a category page with sidebars and they has to be on this category.

    Thanks!

    #446988

    Leo
    Staff

    You can either use CSS:

    .category-tutorials #right-sidebar {
        display: none;
    }

    Adding CSS: https://docs.generatepress.com/article/adding-css/

    Or use this function here:
    https://docs.generatepress.com/article/sidebar-layout/#using-a-function

    Want to help support GP? Please consider leaving us a review!
    https://wordpress.org/support/theme/generatepress/reviews

    #447504

    Hi Leo,

    Thanks this is great. Is used the solution with the function, because with css the space of the sidebar is still there, but I wan’t it to be over the whole width of the content.

    Thanks again!

    #447516

    There’s lots of WP widget visibility plugins that may help too.

    #447517

    Hi Pete, yeah I know. Tried some, but the still showed the search and archive page, unless I stated them to be not visible…

    #447540

    Sometimes I just insert a blank text widget

    #447559

    Ok, but I don’t want the whole sidebar to display, so the solutions from Leo worked for me.
    But thanks for your solution and maybe for future projects it will be helpfull 🙂

    #447809

    Leo
    Staff

    Glad I could help!

    Want to help support GP? Please consider leaving us a review!
    https://wordpress.org/support/theme/generatepress/reviews

Viewing 10 posts - 1 through 10 (of 10 total)

You must be logged in to reply to this topic.