Support » Plugin: WP-TopBar » Creating Image Link

  • Resolved Liltiger


    Hi There,

    It’s me again and I’ve got a question about creating an image link, (similar to the text link).

    I don’t know my php, but I’m trying to do something like:

    echo '<a href=".$wptbOptions['bar_link'].'/"><img src="'.$wptbOptions['bar_image'].'" style="background-position: center;"></a>; background-color: {$wptbOptions['bar_color']};';

    Lol, I really apologize for the coding! Would you please help me out?

    Thanks Again!

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Bob


    Do you want to replace the normal TopBat with a clickable image?


    Yes, that would be great. I’d also like to be able to change the background color if necessary.

    Much Thanks!

    I should also mention that I tried to add <img src=””> to the php and at the end of the php (per previous thread), but it did not work.

    Plugin Author Bob


    OK — you cannot replace the TopBar with an image. You can ADD a clickable image:

    Use the PHP option (before or after — your choice):

    ?><a href=""><img src="http://ImageLocationURL" /></a><?php

    Change and ImageLocationURL to what you need it to be.


    Hi, I didn’t realize that I had to include the closures, but it worked just perfect. Thank you!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Creating Image Link’ is closed to new replies.