I have written this code to loop through the last 6 posts and display their titles in latest news box below the header. The post appear fine but they cannot be clicked to go to the post.
Heres the code
<div id="freshlyWrapper">
<div id="freshlyposts">
<?php
$freshlyIonised = new WP_Query();
$freshlyIonised->query('category_name=featured&showposts=6');
while($freshlyIonised->have_posts()):
$freshlyIonised->the_post();
?>
<div class="freshlyionisedbox"><h3><?php the_title(); ?><a href="<?php the_permalink() ?>"></a></h3>
</div>
Fix your
a
inner:Now your titles are outside those correspondent links
Yeah, you need to set the title WITHIN the a tag:
And add a semicolon after the permalink function: