Back to Community

How to Remove or Hide Elements in GeneratePress: A Complete Troubleshooting Guide

35 threads Sep 16, 2025 ThemeGeneratepress

Content

Many GeneratePress users encounter situations where they need to remove or hide specific elements from their website layout. Whether it's post titles, featured images, meta data, or navigation elements, this comprehensive guide covers the most effective methods to achieve a cleaner design.

Common Elements Users Want to Remove

Based on community discussions, these are the most frequently requested removals:

  • Post titles and content titles
  • Featured images from post headers
  • Post meta data (dates, categories, tags, author information)
  • Post navigation (previous/next buttons)
  • Recent posts widgets
  • Author boxes and footer entry meta
  • White space and background elements

Two Main Approaches: CSS vs PHP

CSS Method (Visual Hiding)

CSS hiding is simpler but only removes elements visually - the HTML code remains in the page source, which means search engines can still see it.

Example for hiding featured images:

.featured-image {
    display: none;
}

Example for hiding post meta data:

.entry-meta {
    display: none;
}

Example for hiding tags:

.single-post span.tags-links {
    display: none;
}

PHP Method (Complete Removal)

PHP snippets completely remove elements from the code, making them invisible to both users and search engines. This is the preferred method for SEO purposes.

Remove post navigation completely:

add_filter( 'generate_show_post_navigation', '__return_false' );

Remove featured image from single posts:

add_action( 'after_setup_theme', function() {
    remove_action( 'generate_before_content', 'generate_featured_page_header_inside_single', 10 );
} );

Remove footer meta items:

add_filter( 'generate_footer_entry_meta_items', function( $items ) {
    return array_diff( $items, array( 'post-navigation' ) );
} );

Remove meta data from archive pages:

add_action( 'wp', function() {
    if ( !is_single() ) {
        remove_action( 'generate_after_entry_content', 'generate_footer_meta' );
    }
} );

How to Add Custom Code to Your Site

For PHP snippets, you'll need to:

  1. Use a code snippets plugin (recommended for safety)
  2. Or add code to your child theme's functions.php file

For CSS code, navigate to Appearance → Customize → Additional CSS in your WordPress dashboard and paste the code there.

When GeneratePress Premium Might Be Needed

Some removal options are only available through the GeneratePress Premium plugin's visual controls, including:

  • Disable Elements module for content titles
  • Blog module for post navigation settings
  • Advanced styling options for archive layouts

Troubleshooting Tips

  • Always use a child theme when modifying PHP files
  • Test code in a staging environment first
  • Clear your cache after adding new code
  • Use browser developer tools to identify correct CSS classes
  • Check if elements are coming from plugins rather than the theme

Remember that some elements might require specific targeting for different page types (single posts, archives, pages). If you encounter issues, try more specific CSS selectors or consult the GeneratePress documentation for appropriate PHP hooks.

Related Support Threads Support