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*

Child theme advice

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #36489
    info110
    Participant

    I wanted to figure out how to make a child theme, so I created the directory and added style.css with the follow in it…

    /*
    Theme Name: interface Child Theme
    Author: Self-Help WordPress User
    Template: interface
    */


    @import
    url(“../interface/style.css”);

    I then used the preview function and between the home slogan section and service widget section was a search bar, then below it was recent posts section and then below it was category section.

    What went wrong?

    #36516

    Hi info110,

    Hi yes after adding this below code in style.css will create a child theme

    /*
    Theme Name: interface Child Theme
    Author: Self-Help WordPress User
    Template: interface
    */
    
    @import url(“../interface/style.css”);

    If you like to work with the php functions then first you need to create a child theme and then unhook the functions. Then only customize the code. We have already mentioned how to create a child theme. View this below post how to create a child theme
    27641

    Thank you!

    #36548
    info110
    Participant

    The post you reference and all code for functions.php produces error messages.

    #36612

    Hi info110,

    That must not be an error. We have tested in our environment.

    <?php
    // Unhook default Thematic functions
    function unhook_thematic_functions() {
        // Don't forget the position number if the original function has one
    
    remove_action( ‘interface_404_content', ‘interface_display_404_page_content', 10 );
    
    }
    add_action('init','unhook_thematic_functions'); // removes the header content by using hook interface_header
    
    add_action( ‘interface_404_content', ‘interface_child_display_404_page_content', 10 );
    /**
     * function to show the footer info, copyright information
     */
     
     
    function interface_child_display_404_page_content() {      ?>   
    <div id="content">
    		<header class="entry-header">
    			<h1 class="entry-title"><?php _e( 'Error 404-Page NOT Found', ‘interface’ ); ?></h1>
    		</header>
    		<div class="entry-content clearfix" >
    			<p>You page 404 is Changed. Thank you</p> 
    		</div><!-- .entry-content -->
    	</div><!-- #content -->
      <?php 
    } ?>

    The above code is just only an example to over ride page 404.php, Similarly you need to modify what you need to change. If you are unable then you need to hire a developer to fix it.

    Thank you!

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