badget

Biggest Sale! Special Offer!

Get 30% discount on all of our single themes with this coupon code: #30%SALE

Hurry up! *Limited time offer*

404 page

Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #17226
    levi0322
    Participant

    Hi,
    I would like to know how I can create a new 404 error page, I have set up my clean retina child theme, but am unsure what to do next?

    I understand that I am to copy the 404.php into child theme, would like to know what to do here.
    Also, when I look in the parent theme in 404.php and then look at the 404 error page, I don’t understand were the info is coming from, as there is nothing in 404.php for me to change.

    Any help would be appreciated, am still a newbie 🙂
    thanking you in advance.

    #17266
    levi0322
    Participant

    I have scoured the internet and this forum for answers and I am still confused.
    I am not sure about following the answers I have found in this forum, as they are not for the clean retina free version.
    Please, I just want in steps, layman’s terms…. how to do this.

    #17289

    hi levi0322,
    We recommended not to change the code because if you change the code then while updating to our new version all your customisation code will be lost. So better make child theme and first unhook the functions and the edit the code.

    Example to customize the 404.php page

    unhook functions
    
    // Unhook default Thematic functions
    function unhook_thematic_functions() {
        // Don't forget the position number if the original function has one
    
    remove_action( 'cleanretina_404_content', 'cleanretina_display_404_page_content', 10 );
    
    }
    add_action('init','unhook_thematic_functions'); // removes the header content by using hook cleanretina_header
    
    add_action( 'cleanretina_404_content', 'cleanretina_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' ); ?></a></h1>
    		</header>
    		<div class="entry-content clearfix" >
    			<p>Thank you</p> 
    		</div><!-- .entry-content -->
    	</div><!-- #content -->
      <?php 
    }
    #17320
    levi0322
    Participant

    Hi, I am not sure what you are trying to tell me here?
    I copied this example and put it in a 404.php in child theme, is this right? Because when I check my 404 page it just looks the same and nothing has changed.
    thanks

    #17354

    Hi levi0322,
    Yes exactly. Create a child theme folder (cleanretina_child) inside wp-content -> themes
    create two file
    1> style.css and import the css
    2> functions.php
    under function.php add the above code then when 404.php page is called it will display thank you. Because there is `<p>Thank you</p>
    ` You can use any text you want under it.

    Thank you!

    #17380
    levi0322
    Participant

    Hi, I created a functions.php and put in in my child theme, and nothing happened, so I went in and activated child theme to have a look and got an ‘internal error’ or something like that, so I had to go back and delete the functions.php from child.
    Not sure what I am doing wrong here, or not understanding what you are telling me.
    thanks.

    #17393

    Hi levi0322,
    We can’t create your child theme. We provide only the solution. If still you could not solve it then you may hire a developer to fix it.
    Once read it more carefully

    http://codex.wordpress.org/Child_Themes

    Thank you!

    #17431
    levi0322
    Participant

    I’m just gonna try one more time…. 🙂
    I have created my child theme, that is not what I am asking, I am asking you if I was correct to put the above code into a functions.php and upload it to my child theme? Because I did this, and it didn’t work for me.

    Below is what I have used for the Child Theme, could you please, have a look at it and tell me if all good? As it seems to be working fine, and please, please tell me, if uploading the code to functions.php into theme is the right thing to do??
    Thank you

    /*
    Theme Name: Clean Retina Child
    Theme URI: http://aging-naturally.com/clean-retina-child/
    Description: Clean Retina Child Theme
    Author: Pauline Downie
    Author URI: http://aging-naturally.com
    Template: clean-retina
    Version: 1.0.0
    Tags: light, dark, two-columns, right-sidebar, responsive-layout, accessibility-ready
    Text Domain: clean-retina-child
    */


    @import
    url(“../clean-retina/style.css”);

    /* =Theme customization starts here
    ————————————————————– */

    #17448

    Hi levi0322,
    Yes this above code must be inside style.css

    /*
    Theme Name: Clean Retina Child
    Theme URI: http://aging-naturally.com/clean-retina-child/
    Description: Clean Retina Child Theme
    Author: Pauline Downie
    Author URI: http://aging-naturally.com
    Template: clean-retina
    Version: 1.0.0
    Tags: light, dark, two-columns, right-sidebar, responsive-layout, accessibility-ready
    Text Domain: clean-retina-child
    */
    
    @import url(“../clean-retina/style.css”);
    
    /* =Theme customization starts here
    ————————————————————– */ 

    After doing this this will import all the css from your parent theme

    Regardless to page 404

    Create one functions.php file
    after this paste this code

    unhook functions
    
    // Unhook default Thematic functions
    function unhook_thematic_functions() {
        // Don't forget the position number if the original function has one
    
    remove_action( 'cleanretina_404_content', 'cleanretina_display_404_page_content', 10 );
    
    }
    add_action('init','unhook_thematic_functions');
    
    add_action( 'cleanretina_404_content', 'cleanretina_child_display_404_page_content', 10 );
    
    function cleanretina_child_display_404_page_content() {      ?>   
    <div id="content">
    		<header class="entry-header">
    			<h1 class="entry-title"><?php _e( 'Error 404-Page NOT Found', 'attitude' ); ?></a></h1>
    		</header>
    		<div class="entry-content clearfix" >
    			<p>Thank you</p> 
    		</div><!-- .entry-content -->
    	</div><!-- #content -->
      <?php 
    }

    Make sure that you have created the child theme folder inside themes folder

    Thank you!

    #17623
    levi0322
    Participant

    Hi, I will just run this past you one more time, then I think for sanity sake I just leave it alone….

    I have put a functions.php in to my child theme with the above code, which is in the themes folder and nothing has happened, my 404 page still looks the same.

    Is there something I am doing wrong??

    Thank you 🙂

    #17635

    hi levi0322,
    Just add this functions inside functions.php at the top of the page.

    <?php
    
    add_action( 'wp_enqueue_scripts', 'enqueue_child_theme_styles', PHP_INT_MAX);
    function enqueue_child_theme_styles() {
        wp_enqueue_style( 'parent-style', get_template_directory_uri().'/style.css' );
        wp_enqueue_style( 'child-style', get_stylesheet_uri(), array('parent-style')  );
    }

    make sure that your child theme is created or not and from dashboard -> appearance -> themes

    If yes then activate the child theme first. Once send you site url too. If still you are unable then you need to hire a developer. Because we don’t ask ftp. And from the dashboard only its not possible to customise the code.

    Thank you!

    #17646
    levi0322
    Participant

    I’m sorry, I have no idea what you are trying to tell me! I really can’t understand what you are saying here!!

    #17647
    levi0322
    Participant

    Are you saying to add the above code, to the functions.php in child theme, and put it above the code you sent me earlier??

    #17649

    Hi levi0322,
    We don’t ask ftp so we can’t customise the code. So you need to hire a developer to fix it. We are sorry for this.
    Can you send a child theme folder at [email protected]
    We will look over it. Please while sending the email don’t forget to send this forum url too. You topic will be replied on monday only.

    Thank you!

Viewing 14 posts - 1 through 14 (of 14 total)
  • You must be logged in to reply to this topic.