• Resolved duncanjbrown

    (@duncanjbrown)


    Hi,

    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

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to get_permalink within custom wp_query?’ is closed to new replies.