Jump to content

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>

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.