April 22, 2016 at 7:49 am
#44406
Theme Horse Support Team
Keymaster
Hi shegga,
To create a child theme view WordPress Codex for Child Theme. Also we have replied many times how to create a child theme. Search Child Theme and you will get more solutions of creating it.
Create a child folder inside wp-content -> themes -> (your child theme folder (name is as interface-pro-child)) Create style.css file and add the below code on style.css
/*
Theme Name: Interface Pro Child
Theme URI: https://www.themehorse.com/themes/interface-pro
Author: Theme Horse
Author URI: https://www.themehorse.com
Description: Interface Pro is a Simple, Clean and Flat Responsive Retina Ready WordPress Theme. It is easily customizable with numerous theme options. Some of the highlighted options are two site layout (Narrow and Wide), 4 layouts for every post/page, 5 Page Templates, 8 widget areas, 6 custom widgets, featured slider to highlight your post/page, 10 social icons, top and bottom info bar to hightlight your contact/email/location and many more. Also has custom background, header, menu, favicon, CSS, webclip icon, and logo. Supports popular plugins like Breadcrumb NavXT, WP-PageNavi and Contact Form 7. It is also translation ready. Get free support at https://www.themehorse.com/support-forum/ and View beautiful demo site at https://www.themehorse.com/preview/interface-pro
Version: 3.0.2
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
Template: interface-pro
*/
Doing only this Your child theme is created. Now to make your email address secure it needs code customization. Create a functios.php file and add the below code under it
<?php
add_action( 'wp_enqueue_scripts', 'interface_enqueue_styles' );
function interface_enqueue_styles() {
wp_enqueue_style( 'interface', get_template_directory_uri() . '/style.css' );
}
function interface_footer_infoblog( $set_flags, $place ='') {
global $array_of_default_settings;
$options = wp_parse_args( get_option( 'interface_theme_options', array() ), interface_get_option_defaults());
$interface_footer_infoblog = '';
$place = '';
if($set_flags || (!empty($options['social_phone'] ) || !empty($options['social_email'] ) || !empty($options['social_location']))){
$interface_footer_infoblog .= '<div class="info-bar">
<div class="container clearfix">';
if(!empty($options['social_phone'] ) || !empty($options['social_email'] ) || !empty($options['social_location']) ) {
$interface_footer_infoblog .= '<div class="info clearfix">
<ul>';
if ( !empty($options['social_phone'] )){
$interface_footer_infoblog .= '<li class=' .'"phone-number"'. '><a title='. __( '" Call Us "', 'interface' ).' '. 'href=' .'"tel:' ;
$interface_footer_infoblog .= preg_replace("/[^() 0-9+-]/", '', $options[ 'social_phone' ]) ;
$interface_footer_infoblog .= '">';
$interface_footer_infoblog .= preg_replace("/[^() 0-9+-]/", '', $options[ 'social_phone' ]) ;
$interface_footer_infoblog .= '</a></li>';
} if (!empty($options['social_email'] )){
$interface_footer_infoblog .='<li class=' .'"email"'. '><a title=' . __( '" Mail Us "', 'interface' ). ' ' . 'href=' .'"mailto:';
$interface_footer_infoblog .= eae_encode_str( is_email($options[ 'social_email'] ) );
$interface_footer_infoblog .='">';
$interface_footer_infoblog .= is_email($options[ 'social_email'] );
$interface_footer_infoblog .='</a></li>';
}if(!empty($options['social_location'])){
$interface_footer_infoblog .='<li class=' .'"address"' .'>';
$interface_footer_infoblog .= esc_attr($options[ 'social_location']);
$interface_footer_infoblog .= '</li>';
}
$interface_footer_infoblog .= '</ul>
</div><!-- .info -->';
}
}
else if($place == "header" && $set_flags == 1 )
$interface_footer_infoblog .= '<div class="info-bar">
<div class="container clearfix">';
echo $interface_footer_infoblog;
} ?>
Thank you!