Ready to get started?Download WordPress


How add single.php to a theme. (3 posts)

  1. wesley88
    Posted 9 years ago #

    My current theme does not has the single.php. I like to add that to my index.php, so when I click on the post will bring me to the full post without sidebar. Where do I add that to the index.php?


  2. Avenir
    Posted 9 years ago #

    You don't need to add anything. Create your single.php the way you want it to look and then put it into your theme's folder. WordPress will take care of the rest for you.

  3. Kafkaesqui

    Posted 9 years ago #

    single.php is a separate primary template (technically referred to as a "query" template), so it's not something you would add to index.php.

    To create a single.php, the easiest method is to make a copy of your theme's index.php, and name the copy single.php. You can then edit it to include (or exclude) whatever elements you want. Just note that most themes are designed around specific layout parameters, so removing the sidebar may require additional work to make it look right.

    You may benefit from reading through some of the documentation on WordPress templates and themeing:


Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.