Are you a GenerateCustomer?

Do you have an active GP Premium or GenerateBlocks Pro license key?

Create a GenerateSupport account for GeneratePress and GenerateBlocks support in one dedicated place.

Create an account
Already have a GenerateSupport account? Login

Just browsing?

Feel free to browse the forums. Support for our free versions is provided on WordPress.org (GeneratePress, GenerateBlocks).

Want to become a premium user? Learn more below.

Need Help Removing Sidebars from Custom Post Type Archives

  • I’m building a site with a custom child theme and having trouble
    removing sidebars from our custom post type archive pages.

    Setup:
    – GeneratePress Pro (latest version)
    – Custom child theme
    – Custom post types registered via plugins
    – Custom archive template at:
    https://zippicks.com/vibes/

    Issue:
    The sidebar still appears on our custom archive pages (e.g., /vibes/) despite trying
    multiple approaches:

    What I’ve tried:
    1. Adding filters in the template file:
    remove_action(‘generate_before_main_content’, ‘generate_construct_sidebars’);
    add_filter(‘generate_sidebar_layout’, function() { return ‘no-sidebar’; });

    2. Adding hooks in child theme functions.php at various priorities
    3. Using CSS to hide sidebar elements with !important
    4. Removing all sidebar-related actions

    None of these approaches have worked. The sidebar continues to display.

    Questions:
    1. What’s the correct way to remove sidebars from custom post type archives in
    GeneratePress?
    2. Are there GP Premium modules that might be overriding these settings?
    3. Is there a specific hook timing/priority I should use?

    Any guidance would be greatly appreciated. Thank you!

  • Hi there,

    Using CSS would be the easier option here, but when I checked the archive link you provided, it appears to be showing a blank page. Did you remove the archive layout? Let me know so I can take a closer look.

  • Hi Alvind,

    Thank you for the follow up. It should be visible now – https://zippicks.com/vibes/. Would you recommend the CSS in the child theme or the plugin?

  • I am seeing a blank page as well.

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