Before you ask please READ THIS

404 Page Shows Site Header

I'm trying to get my 404 page to show up without the site header as I made a custom one for the page. I'm thinking there's got to be something within my 404.php file that might be overriding my 404 page's code.

Example of a link that goes to the 404 page where my transparent header shows up on top: https://elogiclearning.com/category/increase-productivity/

Anyone else run into this and figure out a solution?

Btw, I'm using the Rife theme.

Comments

  • AirAir
    edited December 2018 Posts: 10,970
    Hey :-)

    To remove header for 404 page best would be using add such code to functions.php file
    add_filter('a13_options_header_switch', function($value){
        //if 404, disable theme header
        if(is_404()){
           return 'off';
        }
        
        //otherwise return value from settings
        return $value;
    });
    Should fix your issue right away :-)

    With kind regards.
    Post edited by Air on
  • That did fix it, however, the 404 title is still showing at the top even though I toggled the title to hide on the page. Any ideas how to make that go away and get everything to move up?

    Screenshot attached.
    404-screenshot.PNG
    1905 x 898 - 377K
  • AirAir
    Posts: 10,970
    Please Try to disable title bar in page options https://rifetheme.com/help/docs/content-management/pages/pages-options/

    It should hide black 404 at the top.

    With kind regards.
  • That worked! Thanks so much. :-)
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!