Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End WordPress IF statements

  • This topic is empty.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #30710

    Hi everyone,
    I am coding a theme and I want to show related posts in the sidebar, as you can imagine I only want to show this if its in single.php. I am starting to learn php and im not quite sure on how to code it.

    #74971
    TheDoc
    Member

    No problemo!

    
    // related posts thinger
    } ?>
    #74972

    Great, thanks alot! I knew it would be something very simple like that.

    #73451
    Chris Coyier
    Keymaster

    If you feel like reading up more: http://codex.wordpress.org/Conditional_Tags

    #72777
    Rob MacKay
    Participant

    also if you think of it more as a PHP if statement and not a WP if statement – it will help you in the future :)

Viewing 5 posts - 1 through 5 (of 5 total)
  • The forum ‘Back End’ is closed to new topics and replies.