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*

recommended functions.php

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #19818
    maria.economides
    Participant

    Hello.

    I am creating a child theme for Interface Pro. My style.css is:

    /*
    Theme Name: Interface Pro Child
    Theme URI: http://diabetologist.value2market.com/interface-pro-child
    Author: Maria Tsilimidou
    Author URI: http://diabetologist.value2market.com
    Description: Interface Pro is a Simple, Clean and Flat Responsive Retina Ready WordPress Template: interface-pro
    Version: 1.0
    License: GNU General Public License v2 or later
    License URI: http://www.gnu.org/licenses/gpl-2.0.html
    Tags: white, light, green, two-columns, left-sidebar, right-sidebar, fluid-layout, custom-menu, custom-background, custom-header, featured-images, full-width-template, theme-options, threaded-comments, translation-ready, sticky-post
    Text Domain: interface-pro-child

    /* 

    I guess it’s all right, I get no critical messages in my WP Dashboard for this. However there must be a problem with my functions.php

    Can you post the recommended code for the child theme function.php?

    Thank you!

    #19827

    Hi maria.economides,
    Yes upto there you are correct
    To import your css use it

    @import
    url(“../interface-pro/style.css”);
    /* =Theme customization starts here
    ————————————————————– */
    [rest of custom style css]

    and create a functions.php if you want to override file then,
    For example to unhook the functions and over ride the parent theme for page 404.php
    unhook functions

    // 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>Thank you</p> 
    		</div><!-- .entry-content -->
    	</div><!-- #content -->
      <?php 
    }
    

    For more information http://codex.wordpress.org/Child_Themes

    Thank You!

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