Jump to content

[SOLVED] help creating link properly


bgbs

Recommended Posts

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>

Link to comment
https://forums.phpfreaks.com/topic/169984-solved-help-creating-link-properly/
Share on other sites

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>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.