-
sportsdata
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 actionsNone 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!
-
Alvind
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.
-
sportsdata
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.
- You must be logged in to reply to this topic.