Board index   FAQ   Search  
Register  Login
Board index php forum :: php coding PHP coding => Images

How to make featured slider image (entire) clickable url?

images php coding issues or problems here.

Moderators: macek, egami, gesf

How to make featured slider image (entire) clickable url?

Postby whitsend79 » Sat Nov 23, 2013 5:58 pm

Im trying to figure out how to make the featured slider image (Wooslider) clickable rather than just the title? I dont want a black title box, I'd rather the user just be able to click on the image itself. This is what the code looks like now for the area that I'm needing help with...

$url = get_post_meta( get_the_ID(), 'url', true );
$title = get_the_title();
if ( $url != '' ) {
$title = '<a href="' . esc_url( $url ) . '" title="' . esc_attr( $title ) . '">' . $title . '</a>';

Thats where I can click on the text/title box, I'd like to make that into a image clickable url if I'm saying it right. Thank you
New php-forum User
New php-forum User
Posts: 1
Joined: Sat Nov 23, 2013 5:54 pm

Return to PHP coding => Images

Who is online

Users browsing this forum: No registered users and 1 guest

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.