• It seems like by default the footer is not shown on the 404 page. Would there be an option to enable this, or a way to do it with a child theme? My footer contains navigation links that would be helpful on a 404 page, and it seems inconsistent with my theme to have 1 page without the footer.

Viewing 1 replies (of 1 total)
  • Branko

    (@brankoconjic)

    Hi,

    You can modify theme function sinatra_is_footer_displayed in inc/common.php line #412, or even better you can use sinatra_is_footer_displayed filter.

    Here’s the sinatra_is_footer_displayed function:

    function sinatra_is_footer_displayed( $post_id = 0 ) {
    
    	if ( ! $post_id ) {
    		$post_id = sinatra_get_the_id();
    	}
    
    	$footer_displayed = sinatra_option( 'enable_footer' );
    
    	if ( $post_id && $footer_displayed ) {
    		$footer_displayed = ! get_post_meta( $post_id, 'sinatra_disable_footer', true );
    	}
    
    	// Do not show footer widgets on 404 page.
    	if ( is_404() ) {
    		$footer_displayed = false;
    	}
    
    	if ( $footer_displayed && ! current_user_can( 'edit_theme_options' ) ) {
    
    		$footer_columns = sinatra_get_footer_column_count();
    		$footer_active  = false;
    
    		for ( $i = 1; $i <= $footer_columns; $i++ ) {
    			$footer_active = $footer_active || is_active_sidebar( 'sinatra-footer-' . $i );
    		}
    
    		$footer_displayed = $footer_displayed && $footer_active;
    	}
    
    	return apply_filters( 'sinatra_is_footer_displayed', $footer_displayed, $post_id );
    }
Viewing 1 replies (of 1 total)
  • The topic ‘Display footer on 404 page’ is closed to new replies.