WordPress.org

Ready to get started?Download WordPress

Forums

WP-TopBar
[resolved] Creating Image Link (6 posts)

  1. Liltiger
    Member
    Posted 11 months ago #

    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!

    http://wordpress.org/plugins/wp-topbar/

  2. Bob
    Member
    Plugin Author

    Posted 11 months ago #

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

  3. Liltiger
    Member
    Posted 11 months ago #

    Hello,

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

    Much Thanks!

  4. Liltiger
    Member
    Posted 11 months ago #

    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.

  5. Bob
    Member
    Plugin Author

    Posted 11 months ago #

    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="http://LandingPageURL.com"><img src="http://ImageLocationURL" /></a><?php

    Change LandingPageURL.com and ImageLocationURL to what you need it to be.

    Bob

  6. Liltiger
    Member
    Posted 11 months ago #

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

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.