- This topic has 3 replies, 2 voices, and was last updated 7 years, 8 months ago by Theme Horse Support Team.
-
AuthorPosts
-
July 11, 2016 at 2:08 pm #45931jeanlucgarnierParticipant
Hi all,
The title says it all: I’d like to customize the 404 page with my Attitude Pro theme, but couldn’t find any documentation on this…
Any clue welcome!
Thanks in advance.
July 12, 2016 at 7:48 am #45939Theme Horse Support TeamKeymasterHi jeanlucgarnier,
There is no any documentation available to customize 404 page. We have already replied on forum to customize 404 page using child theme. You can also search on forum. What you need to do is create child theme with two file (style.css and functions.php)
This is an example how to unhook page 404.php and use your own content.
First of all you need to unhook the functions and then only customize the code in your child theme functions.php. Here is a simple example how to unhook functions and customize the code. Below code should be added inside functions.php of child theme.// Unhook default Thematic functions function unhook_thematic_functions() { // Don't forget the position number if the original function has one remove_action( 'attitude_404_content', 'attitude_display_404_page_content', 10 ); } add_action('init','unhook_thematic_functions'); // removes the header content by using hook attitude_header add_action( 'attitude_404_content', 'attitude_child_display_404_page_content', 10 ); /** * function to show the footer info, copyright information */ function attitude_child_display_404_page_content() { ?> <div id="content"> <header class="entry-header"> <h1 class="entry-title"><?php _e( 'Error 404-Page NOT Found', 'attitude' ); ?></h1> </header> <div class="entry-content clearfix" > <p>Thank you</p> </div><!-- .entry-content --> </div><!-- #content --> <?php }
Thank you!
July 21, 2016 at 3:00 pm #46087jeanlucgarnierParticipantThanks a lot, will give it a try!
July 22, 2016 at 6:17 am #46100Theme Horse Support TeamKeymasterAll the best jeanlucgarnier
Thank you
-
AuthorPosts
- You must be logged in to reply to this topic.