• My question is very simple:

    Looking to get the permalink of a post using it’s title. Basically trying to accomplish something that would work like “get_permalink(‘Title of Post’)”.

    When I use “get_permalink(‘100’)”, for example, all it does is output http://www.mysite.com/?p=100, which is especially worthless since I’m using pretty permalinks.

    The reason I can’t just put the link into the post directly is because it will be supplied conditionally by a custom meta field.

    Any thoughts?

Viewing 2 replies - 1 through 2 (of 2 total)
  • If I understand what you’re looking for correctly, <?php echo $post->post_name; ?> should do it.

    Thread Starter leafmealone

    (@leafmealone)

    Thanks for the reply. My fault, I should have been more specific:

    The call I want to make will be within a post’s loop but in reference to another post in a different category.

    The exact situation is that I have a post in a “Shows” category containing an upcoming event’s details. One of those details I would like to be a link to a post in a “Venues” category, that has the venue’s address, a google map API, and other details about the venue.

    I probably have to do another Query…but I’m not sure how to accomplish this.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Get permalink by post title’ is closed to new replies.