Error-404 No header

edited April 2015 in Theme support
There is no option to provide a header for the 404 page.  I am using the custom 404 page (Muffin Options > Getting Started > Advanced) and the unique page I chose is showing the builder content w/ sidebar but no header.  I didn't check footer because I have built that in via the page's muffin builder and it shows as desired.  I would like it to match the rest of my site.

I should add that the permalink of the actual 404 page does show the header.

Comments

  • Error 404 page does not have header and it is not possible to setup it for this page.
  • Actually it is possible and it was very simple, you should add an option switch in the theme's options to update the core theme for those that don't want to have to manually do this every time.  This is a good suggestion.

    The manual way:

    1) I copied the 404.php from the parent theme to the child theme directory.

    2)I then opened the header.php of the parent and copied all of the header code just after the body tag down to the last hook (mfn_hook_content_before) and pasted that in the child theme's 404.php immediately below the conditional if( $customID ) statement.

    Some of the options included in the header.php code are null and will simply be ignored but if you want to get rid of the sub-header for example, or provide sub-header title, simply edit that part of the html, I found within:

    elseif( ! mfn_slider() || mfn_opts_get( 'subheader-slider-show' ), for example, to place the words "Error 404" in the sub-header, just replace the php '. mfn_page_title() .' with the text Error 404.  To remove the sub-header which was my preference, I just deleted all lines between the curly braces (all the echo and if lines) in that statement.

    3) I then made sure there was a closing </div> for the #wrapper div that is added. I did this just before the final php "else" tag.

    Now I have my sites header in the custom 404 page.  Simple.
  • Hello Pingram3541, can you please elaborate more how you changed the 404 page?

    I am trying to read a custom page. The problem is that is going full width and don't respect my boxed layout.
  • Thanks Pingram! That did the trick for me.
  • edited July 2016
    Thank you! Helped me solve my problem. I love the BeTheme Community!
  • edited August 2016
    Muffingroup is far to quick to say "it is not possible" - you can very easily tell the 404 page to fetch the header and footer.
    Copy 404.php from the betheme directory to your child theme directory.
    Edit the copy of 404.php:
    1) Add the line <?php get_header();?> to the start of the file (directly below the line <?php wp_head();?>).
    2) Add the line <?php get_footer(); ?> at the end of the file (directly above the line <!-- wp_footer() -->).
       
     

  • @pddl Yes, it's true. Everything is possible if you know coding but if you read Support Policy, you will realize that files customization are not allowed.
  • Yes and it's not always that simple, especially in the case of BeTheme leaving opening div elements in the header that the 404 template must also know to accommodate.  Sometimes browsers are smart enough to fix this, other times they are not.

    But I agree in that maybe the wording of the response from MG could be better formatted to state "It may be possible but would require knowledge of code and is not supported within the current Support Policy. You might consider adding this in our suggestions thread."
Sign In or Register to comment.