WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. Liltiger
    Member
    Posted 1 year 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 1 year ago #

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

  3. Liltiger
    Member
    Posted 1 year 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 1 year 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 1 year 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 1 year ago #

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

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.