• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

I want to remove Pages, Author, Categories, Monthly & Recent posts from 404.php

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › General Discussion › I want to remove Pages, Author, Categories, Monthly & Recent posts from 404.php

This topic is: not resolved

Tagged: seo services

  • This topic has 3 replies, 3 voices, and was last updated 9 years, 6 months ago by ydoxy.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • October 14, 2016 at 10:20 am #194735
    ramon
    Member

    Hello.

    I want to remove Pages, Author, Categories, Monthly and Recent posts from 404.php. I do not know php, but I don't want to use a plugin.

    Could you help me?

    This is the code

    <?php
    /**
     * Genesis Framework.
     *
     * WARNING: This file is part of the core Genesis Framework. DO NOT edit this file under any circumstances.
     * Please do all modifications in the form of a child theme.
     *
     * @package Genesis\Templates
     * @author  StudioPress
     * @license GPL-2.0+
     * @link    http://my.studiopress.com/themes/genesis/
     */
    
    // Remove default loop.
    remove_action( 'genesis_loop', 'genesis_do_loop' );
    
    add_action( 'genesis_loop', 'genesis_404' );
    /**
     * This function outputs a 404 "Not Found" error message.
     *
     * @since 1.6
     */
    function genesis_404() {
    
    	genesis_markup( array(
    		'open' => '<article class="entry">',
    		'context' => 'entry-404',
    	) );
    
    		printf( '<h1 class="entry-title">%s</h1>', apply_filters( 'genesis_404_entry_title', __( 'Not found, error 404', 'genesis' ) ) );
    		echo '<div class="entry-content">';
    
    			if ( genesis_html5() ) :
    
    				echo apply_filters( 'genesis_404_entry_content', '<p>' . sprintf( __( 'The page you are looking for no longer exists. Perhaps you can return back to the site\'s <a href="%s">homepage</a> and see if you can find what you are looking for. Or, you can try finding it by using the search form below.', 'genesis' ), trailingslashit( home_url() ) ) . '</p>' );
    
    				get_search_form();
    
    			else :
    	?>
    
    			<p><?php printf( __( 'The page you are looking for no longer exists. Perhaps you can return back to the site\'s <a href="%s">homepage</a> and see if you can find what you are looking for. Or, you can try finding it with the information below.', 'genesis' ), trailingslashit( home_url() ) ); ?></p>
    
    	<?php
    			endif;
    
    			if ( genesis_a11y( '404-page' ) ) {
    				echo '<h2>' . __( 'Sitemap', 'genesis' ) . '</h2>';
    				genesis_sitemap( 'h3' );
    			} else {
    				genesis_sitemap( 'h4' );
    			}
    
    		echo '</div>';
    
    	genesis_markup( array(
    		'close' => '</article>',
    		'context' => 'entry-404',
    	) );
    
    }
    
    genesis();
    
    October 16, 2016 at 11:21 am #194849
    William
    Member

    Get rid of this part :

    
    		if ( genesis_a11y( '404-page' ) ) {
    				echo '<h2>' . __( 'Sitemap', 'genesis' ) . '</h2>';
    				genesis_sitemap( 'h3' );
    			} else {
    				genesis_sitemap( 'h4' );
    			}
    

    Make sure that you copy and paste your 404.php file to your child theme directory !


    Genesis Customization Service | Quick fixes whenever you need them ! | Contact me at Fixmysite.com !

    November 1, 2016 at 6:30 pm #195620
    ramon
    Member

    Thanks a lot @William

    November 3, 2016 at 2:46 pm #195686
    ydoxy
    Member

    I suggest you to visit Ydoxy for solve your issues on website.

  • Author
    Posts
Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘General Discussion’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2026 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble