0

I'm looking to add an image in the header right text div instead of calling for the text from the theme. I want to do this manually, but can't figure out the proper syntax. Here is the code:

echo '<div class="logo-right-text">';
                echo do_shortcode( __(get_option(THEME_SHORT_NAME . '_logo_right_text'), 'gdl_front_end') );
                echo '</div>';

Any help would be greatly appreciated.

6
  • Do you want to add an image and keep the header right text? Commented Sep 24, 2014 at 1:27
  • I want the image in the header right text div. Not necessarily keep the text. Commented Sep 24, 2014 at 1:28
  • if you want to do this manually why don't you just you an img tag? Commented Sep 24, 2014 at 1:31
  • Where would I add the image tag within that code? Commented Sep 24, 2014 at 1:31
  • Do you need that shortcode to run? it's really hard to tell whats going on on the second line since there is a ton of code that's calling out to. If you don't care if that shortcode runs I can post an answer for you. Commented Sep 24, 2014 at 1:34

1 Answer 1

1

You upload image to images directory into theme current:

echo '<div class="logo-right-text">';
echo '<img src="<?php echo get_template_directory_uri(); ?>/images/Image_name.png" border="0"></a>';
echo '</div>';
Sign up to request clarification or add additional context in comments.

7 Comments

Great, thanks so much! However, when I try to link the images it does not have a hover nor click to another page. Not sure if I should ask here or another question all together?
let me know if you have any question
change link for image: echo '<a href="#"><img src="<?php echo get_template_directory_uri(); ?>/images/Image_name.png" border="0"></a>';
Did that, but it won't allow for a click. Check the social links here: tinyurl.com/q6j8cro
Try this: add css to file style.css .logo-right-text a{ display: block; }
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.