[Resolved] Disable search widget

Home Forums Support Disable search widget

This topic contains 9 replies, has 3 voices, and was last updated by  Leo 10 months, 1 week ago.

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

    Pieter

    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 Customer Support

    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!

    #446763

    Pieter

    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 Customer Support

    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

    #447504

    Pieter

    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

    Pete

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

    #447517

    Pieter

    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

    Pete

    Sometimes I just insert a blank text widget

    #447559

    Pieter

    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 Customer Support
Viewing 10 posts - 1 through 10 (of 10 total)

You must be logged in to reply to this topic.