-
AuthorPosts
-
July 16, 2014 at 6:48 pm #292173
Hey guys,
Again thanks for the great theme, updates, and support. Im a huge fan!
I’m designing a new site and I want to use a certain header layout, but I want to add content to the header. I’m wondering if its possible without messing with the source code files. Here is my site: http://staging.eyemagic.net/. I want to add a “Buy Now” button floated to the right of the logo, and some other text such as testimonials to the right of the logo. Is there a way to do this without changing the source code of the header file?
I found this site in your showcase thread and I really liked it: http://www.execsearch.com/. I’m loosely basing this new design around that site. See how he used the phone # and email to the right of the logo? Did he hard-code this or can this be done through the theme control panel, widgets, or shortcodes?
Thanks for your help!!
Dave
July 16, 2014 at 7:50 pm #292208Hey atrixdave!
Unfortunately it is not possible without making changes on files. Please add following code to Functions.php file in Appearance > Editor
add_action('ava_after_main_menu','logo_text'); function logo_text() { echo "<div class='logo-text'>This is my custom text!</div>"; }
And you can change its position using .logo-text class in Quick CSS field as following
.logo-text { left: -10px; top: -10px; }
Regards,
Yigit- This reply was modified 10 years, 4 months ago by Yigit.
July 17, 2014 at 2:28 am #292323Ok thank you Yigit. Will I need to modify this each time the theme is updated?
July 17, 2014 at 2:33 am #292324Hey!
Yes, or you can use a child theme. For more information, please see – http://kriesi.at/documentation/enfold/using-a-child-theme/
Cheers!
YigitJuly 17, 2014 at 2:36 am #292328Ok thank you! Where exactly in functions.php should I put the code? I added it and its displaying under the menu instead of to the right of the logo? I’m trying to move it around with CSS but its not moving. Sorry if these are n00b questions :)
July 17, 2014 at 3:02 am #292329Hi!
Please try following code
.logo-text { position: relative; top: -100px; left: 80%; }
It should work now :)
Edit: I just checked your website and it seems like you already figured it out :)Best regards,
Yigit- This reply was modified 10 years, 4 months ago by Yigit.
July 17, 2014 at 3:27 am #292335Thank you! I’ve also set up a child theme for this and will with my other Enfold sites :)
Yigit can you re-open this? I need help adding a link to a button I’ve created: http://staging.eyemagic.net/testimonials/
- This reply was modified 10 years, 4 months ago by atrixdave.
July 17, 2014 at 3:33 am #292337 -
AuthorPosts
- The topic ‘Adding Content to Header’ is closed to new replies.