WordPress.org

Ready to get started?Download WordPress

Forums

Check to see if only 1 post is being displayed when using permalinks? (5 posts)

  1. How can I go about checking to see if a single post is being displayed when using permalinks?

    When not using permalinks, $p is set. This allows me to say if $p, then display a link back to all of the news: http://www.finalgear.com/?p=111

    However, when using permalinks, it seems $p is not set as it doesn't display that text: http://www.finalgear.com/posts/2005/04/25/fifth-gear-07x06-april-25th-2005-delayed/

  2. Er, changed my permalink structure. New example link: http://www.finalgear.com/news/2005/04/25/fifth-gear-07x06-april-25th-2005-delayed/

  3. oriecat
    Member
    Posted 8 years ago #

    I don't understand the question. What's the problem?

  4. ColdForged
    Member
    Posted 8 years ago #

    Try using the is_single() function. Returns true if there's only a single post, otherwise returns false.

  5. ColdForged: oh, excellent. Exactly what I'm looking for. Thanks. :D

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.