WordPress.org

Ready to get started?Download WordPress

Forums

How to get post title from post slug? (1 post)

  1. sweth
    Member
    Posted 7 years ago #

    Using WP 1.5.x and the Dynamic Text Replace plugin, I'm trying to figure out an easy way to let me quickly link to certain posts using their slug rather than their post ID. I've got it mostly working, but I need to figure out how to get the visible text of the link to be the post's title rather than the slug. Basically, what I need is the WP equivalent of "SELECT post_title FROM posts WHERE post_slug = $foo"; it's been so long since I've mucked around w/ WP, though, that I'm completely blanking on if there's a function to handle it or how I'd do a direct database call if that's what I need to do. Can anyone help me out here?

    TIA,

    Sweth.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags