I’m trying – and failing – to include a permalink when displaying the title and author of a single post on the front page.
This is what I have at the moment:
<a class="expert-name" href='<?php get_permalink($post->ID); ?>'><?php the_author(); ?></a>
Output is fine, except the permalink points to the front page of the blog, not the queried post. What’s going on here?
Any help much appreciated.
Edit – this is a custom wp_query, not query_posts