-
AuthorPosts
-
January 17, 2018 at 4:10 pm #898507
Hi, I hope you can help. I have a header that has three additional graphics added to it. I did this by adding custom content to the functions.php file in my Child Theme.
Unfortunately one of the graphics needs to be a link to another website and one is an email link. When I try to add an HTML link to the src=”image-path” in the functions.php file the site breaks completely and you just see a white screen. Can you tell me how I make these additional header images clickable?
Thanks for your help.
DJanuary 17, 2018 at 4:35 pm #898516can you post the code you inserted in functions.php ?
if you want to obfuscate your url set in f.e. //homeurl/… or something like thatJanuary 17, 2018 at 4:40 pm #898518Hi, thanks for getting back to me so quickly. Really appreciated. Here is the code which works fine though the links have been removed in order to allow the rest of the site to work. Please feel free to add some links to something like example.com as the site is not live yet. I have given you the FTP info as well.
Thanks again,
John<?php
/*
* Add your own functions here. You can also copy some of the theme functions into this file.
* WordPress will use those functions instead of the original functions then.
*/function after_head_image_func(){
echo “<div class=’custom_content’></div>”;
echo “<div class=’custom_content2′></div>”;
echo “<div class=’custom_content3′></div>”;
}add_action(‘ava_after_main_menu’, ‘after_head_image_func’);
January 18, 2018 at 9:42 am #898946can you post that with code function here – if you use that little “code” tag above the code is visible at all without beeing changed by board soft.
Or do you like to have the link on the whole inner content?you can use than:
<div class="custom_content"><a href='#' target='_blank'>Custom Content</a></div>
so how to use: click code on top of the editor window – insert your code and press after that the closing code tag
or insert your code – activate the whole code with your mouse as if you like to copy it – press once the code button.January 18, 2018 at 12:52 pm #899111Thanks Guenni, I’ve attached the FTP info as well in the initial email in case you need to look at the file yourself. Please see below:
<?php /* * Add your own functions here. You can also copy some of the theme functions into this file. * WordPress will use those functions instead of the original functions then. */ function after_head_image_func(){ echo "<div class='custom_content'><img src='//homeurl//wp-content/uploads/2018/01/telephone.png'></div>"; echo "<div class='custom_content2'><img src='//homeurl//wp-content/uploads/2018/01/email.png'></div>"; echo "<div class='custom_content3'><img src='//homeurl//wp-content/uploads/2018/01/zl-group.png'></div>"; } add_action('ava_after_main_menu', 'after_head_image_func');
January 19, 2018 at 2:13 pm #899701maybe this way:
function after_head_image_func(){ echo "<div class='custom_content'><a href='tel:+12345'><img src='//homeurl//wp-content/uploads/2018/01/telephone.png'></a></div>"; echo "<div class='custom_content2'><a href='mailto: (Email address hidden if logged out) '><img src='//homeurl//wp-content/uploads/2018/01/email.png'></a></div>"; echo "<div class='custom_content3'><a href='url' target='_blank'><img src='//homeurl//wp-content/uploads/2018/01/zl-group.png'></a></div>"; } add_action('ava_after_main_menu', 'after_head_image_func');
remove the blank target if you like
January 19, 2018 at 2:24 pm #899704Thanks Guenni that’s worked a treat! Brilliant work, cheers!!!
All the best.
D.January 20, 2018 at 11:11 pm #900223Hi,
Glad we could help!
Please take a moment to review our theme and show your support https://themeforest.net/downloads
To know more about enfold features please check – http://kriesi.at/documentation/enfold/
Thank you for using Enfold :)Best regards,
Basilis -
AuthorPosts
- The topic ‘Links in header question’ is closed to new replies.