- This topic has 3 replies, 2 voices, and was last updated 10 years, 10 months ago by Sanjip Shah.
-
AuthorPosts
-
January 2, 2014 at 12:26 am #5936TSP_CICParticipant
Dear Theme Horse,
Firstly I just wanted to say thanks for creating such a great theme.
I am completely new to creating websites so sorry if I am asking a stupid question.
I have already created a child theme and have been trying to replace the social icons list and search box in the header with a widget area.
In the child theme’s function.php I have inserted :if (function_exists('register_sidebar')) { register_sidebar( array( 'name' => 'Header', 'id' => 'header_widget', 'description' => 'Shows widgets in header.', 'before_widget' => '<aside id="%1$s" class="widget %2$s">', 'after_widget' => '</aside>', 'before_title' => '<h3 class="widget-title">', 'after_title' => '</h3>' )); }
In the header-extentions.php (which I have put into library->structure of the child theme I have replaced:
<div class="hgroup-wrap clearfix"> <?php if( 0 == $options[ 'hide_header_searchform' ] || 1 == $flag ) { ?> <section class="hgroup-right"> <?php attitude_socialnetworks( $flag ); ?> <?php if( 0 == $options[ 'hide_header_searchform' ] ) get_search_form(); ?> </section><!-- .hgroup-right -->
With:
<div class="hgroup-wrap clearfix"> <section class="hgroup-right"> <?php if ( !function_exists('header_widget') || !header_widget('Header') ) : ?> <?php endif; ?> </section><!-- .hgroup-right -->
However I still have the social bar from the original theme. Are there other elements that need to be changes in the theme to activate child theme header file? I noticed that in the original functions.php there seems to be a directory list. Do I have to change something in there?
The website is http://www.thirdsectorpotential.co.ukBest Wishes,
January 3, 2014 at 8:19 am #5967Sanjip ShahParticipant@TSP_CIC Please go through this link https://www.themehorse.com/support-forum/topic/trying-to-add-a-phone-number-to-the-header-area/. I have discussed there on how to correctly edit the header part.
January 5, 2014 at 11:32 pm #6012TSP_CICParticipantHi found out the issue I had in the end.
Needed to put
require_once( get_stylesheet_directory() . '/library/structure/header-extensions.php' );
into the child’s function.php file to activate the child theme’s header-extensions.phpNow the header widget is operational. Thanks for your support!
January 6, 2014 at 11:13 am #6025Sanjip ShahParticipant@TSP_CIC Okay. Great. Thanks for sharing.
-
AuthorPosts
- You must be logged in to reply to this topic.