Best Premium and Free WordPress Themes › Forums › Corporate Plus Pro › Remove menu on 404 – page not found
- This topic has 5 replies, 2 voices, and was last updated 6 years, 11 months ago by acmesupports.
April 17, 2016 at 11:20 am #5916
Is there a simple way to remove just the menu from the 404-page not found-template? Like a function “get-header-without-menu” and is it useful to change it in the source code or not recommended? Thanks for an advice.April 17, 2016 at 12:06 pm #5920acmesupportsModerator
If you want to remove menu from 404 Page, you have to edit some line of codes. If you are familiar with WordPress codes, you can edit it easily. Please find the code on 404.php and edit it. There is no any simple click and remove options available for it. If you are not familiar with WordPress codes, it would better you hire customizer to complete your task. Our dedicated customization team will add your requirements. http://www.acmethemes.com/customization-request/
ThanksApril 18, 2016 at 6:45 am #5919
I am familiar with WordPress-Code and I know that the whole header (incl. menu) is with “get_header();”.
So I do need to write a new method i.e.: “get_header_without_menu()” and call it. Is the get_header() method in header.php? Thanks so much.April 18, 2016 at 7:47 am #5918acmesupportsModerator
If you are familiar with WordPress codes, then find the hooks used on ‘header.php’ file and override the hooks from the Child theme. Our theme is child theme compatible so that you can change the hooks from the child theme easily. ‘get_header()’ function is used to call header.php file in WordPress. You can use the conditional programming on this case, check that page is 404 page or not, if that page is 404 hide menu.
I think you can do it easily. You can find the hooks insides the acmethemes folder.
ThanksApril 18, 2016 at 9:53 am #5917
solved – thank you
- The topic ‘Remove menu on 404 – page not found’ is closed to new replies.