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*

Editing Social Bar

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #5936
    TSP_CIC
    Participant

    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.uk

    Best Wishes,

    #5967
    Sanjip Shah
    Participant

    @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.

    #6012
    TSP_CIC
    Participant

    Hi 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.php

    Now the header widget is operational. Thanks for your support!

    #6025
    Sanjip Shah
    Participant

    @TSP_CIC Okay. Great. Thanks for sharing.

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