bgbs Posted August 12, 2009 Share Posted August 12, 2009 I need help with this php tag. It is located on my site on homepage bibikova.com where the three Latest Images are located. I want to be able to link those images to their proper post. I was able to do the image titles below the images, but I want people to be able to click on images too. When I applied href tag around the image it does something to css borders, I just wanted to see if any of you guys know the proper and easiest way to fix my dilemma. Here is the code below. <img src="<?php bloginfo('template_url'); ?>/timthumb.php?src=<? echo get_post_meta($post->ID, 'post_image_value', true) ?>&w=190&zc=1" alt=" <?php the_title(); ?>"/></div> <span class="featured-image-text"><a href="<? the_permalink() ?>" rel="bookmark" title="Go to <?php the_title_attribute(); ?>"><?php the_title(); ?></a> Quote Link to comment https://forums.phpfreaks.com/topic/169984-solved-help-creating-link-properly/ Share on other sites More sharing options...
smerny Posted August 12, 2009 Share Posted August 12, 2009 How did you attempt to put the href around it? Did you also put the span class around it? sort of depends on the css, but try <a href="<?php the_permalink() ?>"> <img src="<?php bloginfo('template_url'); ?>/timthumb.php?src=<? echo get_post_meta($post->ID, 'post_image_value', true) ?>&w=190&zc=1" alt=" <?php the_title(); ?>"/> </a> </div> <span class="featured-image-text"> <a href="<? the_permalink() ?>" rel="bookmark" title="Go to <?php the_title_attribute(); ?>"><?php the_title(); ?></a> Quote Link to comment https://forums.phpfreaks.com/topic/169984-solved-help-creating-link-properly/#findComment-896725 Share on other sites More sharing options...
bgbs Posted August 12, 2009 Author Share Posted August 12, 2009 I had the closing span tag in code I just forgot to include it in here Thanks for your help the link works perfectly now. I had to do one css adjustment and thats all. Thanks man. Ben Quote Link to comment https://forums.phpfreaks.com/topic/169984-solved-help-creating-link-properly/#findComment-896733 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.