Tagged: Header
- This topic has 19 replies, 9 voices, and was last updated 10 years, 9 months ago by Theme Horse Support Team.
-
AuthorPosts
-
September 2, 2013 at 8:26 pm #3740Jordan WirkkalaParticipant
I am trying to add a phone number to go just above my social icons in my header and cannot figure it out. I went through the .php files and I just cannot figure out where to insert it or what the best way to do so would be. I have killed hours on this and could really use some help.
September 3, 2013 at 7:11 am #3748Sanjip ShahParticipant@jordan-wirkkalagmail-com The file you need to edit is header-extensions.php file. The path of this file is theme folder->library folder->structure folder. The code you need to edit is inside the attitude_headerdetails functions. Add your code/text just above this line
<?php attitude_socialnetworks( $flag ); ?>
which is around line 230. Also use a child theme to make these changes so that you won’t lose the changes when you update the theme.October 3, 2013 at 7:02 pm #4393chavaluParticipantThanks so much for your devoted support.
I’ve wanted to do the same thing and was directed to do this also. What would we do to get the site to load from our child’s new header file? Do we add something in the parent’s and/or child’s functions.php file?
Thank you!October 4, 2013 at 7:42 am #4401Sanjip ShahParticipant@chavalu To learn about how the functions of parent theme are unhooked from an action hook and how a function from child theme is added to action hook you can visit this link http://themeshaper.com/2009/05/25/action-hooks-wordpress-child-themes/. Below is an example of how its done. Put this code in the functions.php file of the child theme inside a php tag ( <?php code here ?> )
add_action( ‘init’, ‘attitude_remove_parent_function’ ); /** * Removes parent function attached to hook */ function attitude_remove_parent_function(){ remove_action( ‘attitude_header’, ‘attitude_headerdetails’, 10 ); } add_action( ‘attitude_header’, ‘attitude_child_headerdetails’, 10 ); /** * Add your custom function */ function attitude_child_headerdetails() { // Copy all the content inside the attitude_headerdetails function of parent theme, paste here and make necessary changes here. }
October 8, 2013 at 5:26 am #4488stefanovd85MemberHi. I was able to add text above the social media icons. However, how do I edit the size of such text? Any help would be greatly appreciated.
October 9, 2013 at 4:43 pm #4523Sanjip ShahParticipant@stefanovd85 In the dashboard, go to Appearance->Theme Options->Design Options Tab->Custom CSS. Paste the following css and click on ‘Save all Changes’.
.telnumber a { font-size: 20px; }
Change the px value according to your choice. Try this out.October 12, 2013 at 12:40 am #4572stefanovd85MemberI tried what you suggested. It did not work. If it helps, the website is http://www.thejacobslaw.com. Thanks
October 12, 2013 at 12:53 am #4573stefanovd85MemberI figured it out, thank you for setting me on the right track. I used:
.telnumber { font-size: 20px; }
October 13, 2013 at 8:37 am #4591Sanjip ShahParticipant@stefanovd85 Okay. Great!
October 22, 2013 at 5:04 pm #4743suntecParticipant@jordan.wirkkala_gmail.com , just a question: I saw your website http://www.newleafcrawlspace.com and it has similiar function implemented what I´ve looking for for long long time. Is it possible that you could disclose me: how did you implement different images in the header area of different pages and a slider on the homepage?
I would very appriciate if you can give me your valuable advice.
Best regards
sxOctober 25, 2013 at 9:11 pm #4814montefusco.pParticipantI am trying to add a phone number to the header and created a child theme, then copied and modified the header-extensions.php file to my child theme, and added this code
<a class="telnumber" href="tel:240-415-8323">Call Now: 240-415-8323</a>
to right above this line
<?php attitude_socialnetworks( $flag ); ?>
But the phone number isn’t showing up (the site is montefuscoestateplanning.com) . What am I missing?
October 25, 2013 at 11:46 pm #4816stefanovd85MemberHi. I am sure the developer would know, but have you tried modifying the parent theme files to see if it would work? … in case there is an issue with the child theme?
October 28, 2013 at 1:38 am #4833montefusco.pParticipantModifying the parent theme files worked. I’ll work some more with the child theme now — thanks so much for your help.
February 19, 2014 at 5:20 pm #7878RiouParticipant*Bump
Has anyone had luck inserting this function inside the child theme? If none, kindly guide me to the right direction.
add_action( ‘init’, ‘attitude_remove_parent_function’ ); /** * Removes parent function attached to hook */ function attitude_remove_parent_function(){ remove_action( ‘attitude_header’, ‘attitude_headerdetails’, 10 ); } add_action( ‘attitude_header’, ‘attitude_child_headerdetails’, 10 ); /** * Add your custom function */ function attitude_child_headerdetails() { // Copy all the content inside the attitude_headerdetails function of parent theme, paste here and make necessary changes here. global $attitude_theme_options_settings; $options = $attitude_theme_options_settings; $elements = array(); $elements = array( $options[ 'social_facebook' ], $options[ 'social_twitter' ], $options[ 'social_googleplus' ], $options[ 'social_linkedin' ], $options[ 'social_pinterest' ], $options[ 'social_youtube' ], $options[ 'social_vimeo' ], $options[ 'social_flickr' ], $options[ 'social_tumblr' ], $options[ 'social_myspace' ], $options[ 'social_rss' ] ); $flag = 0; if( !empty( $elements ) ) { foreach( $elements as $option) { if( !empty( $option ) ) { $flag = 1; } else { $flag = 0; } if( 1 == $flag ) { break; } } } if( 0 == $options[ 'hide_header_searchform' ] || 1 == $flag ) { <a class="telnumber" href="tel:240-415-8323">Call Now: 240-415-8323</a> attitude_socialnetworks( $flag ); if( 0 == $options[ 'hide_header_searchform' ] ) get_search_form(); </section><!-- .hgroup-right --> } }
Thank you for the wonderful theme!
February 21, 2014 at 1:44 am #7925RiouParticipantHelp anyone?
-
AuthorPosts
- You must be logged in to reply to this topic.