Using permalink and a PHP active A HREF
-
I’m using the following code in my search loop results to create links from the thumbnail and title to the full post page.
a href=”?php echo get_permalink($value->ID) ?
?php
$args = array(
‘post_type’ => ‘attachment’,
‘post_mime_type’ => ‘image’,
‘post_parent’ => $post->ID,
‘alt’ =>$title
);
$images = get_posts( $args );
foreach($images as $image):
echo wp_get_attachment_image($images[0]->ID, ‘post-thumbnail’, false);
endforeach;
?
/a
a href=”?php echo get_permalink($value->ID) ?”
h23 ?php echo the_title(); ? /h23
/a(i’ve lost all the <>’s so the code prints)
The result is obviously an active Thumbnail and post titler, but on both links the active clickable area is literally a thin line at the bottom border of the image and a thin line at the top border of the title area, not the whole area of the picture/title that it should be. This is the same on every browser.
I’ve tried making span areas, divs,… but nothing works? Any clues??
- The topic ‘Using permalink and a PHP active A HREF’ is closed to new replies.