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
  • #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.


    No problemo!

    // related posts thinger
    } ?>

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

    Chris Coyier

    If you feel like reading up more:

    Rob MacKay

    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.