• Hi,
    I have been trying for days it seems, to customise my own 404 page.

    I have tried a couple of ways using the child theme, with no success.

    I am using the clean retina theme and still waiting for someone to get back to me from that forum.

    Below is the 404.php and I am totally at a loss as to how to change the page to what I want.

    I am of the impression there needs to be something added to the functions.php?

    I would really appreciate if someone could explain to me in layman’s terms please, as there is so much I still don’t grasp.

    <?php
    /**
    * Displays the 404 error page of the theme.
    *
    * @package Theme Horse
    * @subpackage Clean_Retina
    * @since Clean Retina 1.0
    */
    ?>

    <?php get_header(); ?>

    <?php
    /**
    * cleanretina_404_content hook
    *
    * HOOKED_FUNCTION_NAME PRIORITY
    *
    * cleanretina_display_404_page_content 10
    */
    do_action( ‘cleanretina_404_content’ );
    ?>

    <?php get_footer(); ?>

    thanking you in advance.

Viewing 4 replies - 1 through 4 (of 4 total)
  • hi. you can Create a new ‘404.php’ file in the ‘child themes folder’ or can copy the 404.php file from ur main them and changes it according to ur way,
    ex:
    Use the page.php template from the theme folder as reference, remove all the PHP code, but keep the main layout <div> containers. So your 404.php template should looks like this:
    <?php get_header(); ?>

    <?php
    /** Themify Default Variables
    * @var object */
    global $themify;
    ?>

    <!– layout-container –>
    <div id=”layout” class=”pagewidth clearfix”>

    <!– content –>
    <div id=”content”>

    <h1 class=”page-title”>Sorry, 404 not found</h1>
    <p>write your custom error message</p>

    </div>
    <!– /content –>

    <?php if ($layout != “sidebar-none”): get_sidebar(); endif; ?>

    </div>
    <!– /layout-container –>

    <?php get_footer(); ?>

    ref:https://themify.me/docs/custom-404

    hi. you can Use the page.php template from the theme folder as reference, remove all the PHP code, but keep the main layout <div> containers. So your 404.php template should looks like this:
    <?php get_header(); ?>

    <?php
    /** Themify Default Variables
    * @var object */
    global $themify;
    ?>

    <!– layout-container –>
    <div id=”layout” class=”pagewidth clearfix”>

    <!– content –>
    <div id=”content”>

    <h1 class=”page-title”>Sorry, 404 not found</h1>
    <p>write your custom error message</p>

    </div>
    <!– /content –>

    <?php if ($layout != “sidebar-none”): get_sidebar(); endif; ?>

    </div>
    <!– /layout-container –>

    <?php get_footer(); ?>
    The code may vary depending on the theme
    You can write your own content (in HTML format) in between the <div id=”content”> wrap

    ref:https://www.elegantthemes.com/blog/tips-tricks/creating-custom-wordpress-404-error-pagesa

    Thread Starter ameljor322

    (@ameljor322)

    thank you so much, will give this a go now ??

    Thread Starter ameljor322

    (@ameljor322)

    Hi, I just thought I would show you what my page.php looks like, which is nothing like the example you have given me.
    Could I use your example??

    <?php
    /**
    * Displays the page section of the theme.
    *
    * @package Theme Horse
    * @subpackage Clean_Retina
    * @since Clean Retina 1.0
    */
    ?>

    <?php get_header(); ?>

    <?php
    /**
    * cleanretina_before_main_container hook
    */
    do_action( ‘cleanretina_before_main_container’ );
    ?>

    <div id=”container”>
    <?php
    /**
    * cleanretina_main_container hook
    *
    * HOOKED_FUNCTION_NAME PRIORITY
    *
    * cleanretina_content 10
    */
    do_action( ‘cleanretina_main_container’ );
    ?>
    </div><!– #container –>

    <?php
    /**
    * cleanretina_after_main_container hook
    */
    do_action( ‘cleanretina_after_main_container’ );
    ?>

    <?php get_footer(); ?>

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘child theme 404 error page’ is closed to new replies.