WordPress Theme Development tutorial from scratch (Part 18) Role of single.php, singular.php

In this video we have seen about
“single.php”, “singular.php”, “single-{post-type}.php”

It’s good sense to build as simply as possible in your template structure and not make more templates unless you have real need for them. Therefore, most theme developers don’t create a single-post.php file because single.php is specific enough. For the most part, all themes should have a single.php.

The single post template file is used to render a single post. WordPress uses the following path:
single-{post-type}.php – If the post type is product, WordPress would look for single-product.php.
single.php – WordPress then falls back to single.php.
singular.php – Then it falls back to singular.php.
index.php – Finally, as mentioned above, WordPress ultimately falls back to index.php.

WordPress Version 4.3 added singular.php that comes in the hierarchy after single.php for posts, page.php for pages, and the variations of each. This template follows the rules of is_singular() and is used for a single post, regardless of post type. Themes that used the same code for both of those files (or included one in the other) can now simplify down to the one template.

Use WordPress template hierarchy system

Under the root folder of your theme you can create this files:

single.php for all single posts of any type.
single-post.php, if this file exists, it will be used for standard posts instead of single.php.
single-{post-type}.php, if this file exists, it will only for {post-type} posts instead of single.php

Featured Image & Post Format Concept:
Post Format:
Post Meta data:
Detail of content.php page:

Subscribe :

Also you can learn WordPress Custom
Wordpress Theme Development:

WordPress Widget Development:

WordPress Plugin Development:

WordPress Theme Options Development:

Learn backbone.js here! :
1. Some knowledge of PHP, HTML for this video series
2. How to Install WordPress:
3. WordPress theme setup guide:

theme development in wordpress,
learn theme development in wordpress,
child theme development in wordpress,
theme development in wordpress video tutorial,
theme development in wordpress from scratch,
theme development in wordpress step by step,
theme development in wordpress youtube,
theme development in wordpress tutorial,
custom theme development in wordpress,
learn wordpress theme development,
wordpress tutorial,
wordpress theme tutorial,
wordpress development,
learn wordpress development,
linking files to wordpress,
wordpress asset files,
Register Custom Post Type in wordpress
online web tutor,
profotech solutions,

Please watch: “Learn backbone.js tutorial from scratch”


Online Web Tutor
Keep learning and Sharing 🙂

Fuente – Source

Wordpress Theme Development tutorial from scratch (Part 18) Role of single.php, singular.php

Necesitas ayuda con wp? Entonces WPVideo es tu sitio.
Encuentra lo que buscas entre cientos de miles de videos y experiencias personales de otros usuarios. Todos los que empezamos con wp deberíamos tener acceso a esta web, ojalá yo hubiera tenido algo así cuando empecé mi camino como webmaster 🙂
Pero ahora quiero y puedo poner esta web a vuestra disposición.
Disfrutadla 😉

Need help with wp? Then WPVideo is your site.
Find what you are looking for among hundreds of thousands of videos and personal experiences of other users. All of us who started with wp should have access to this website, I wish I had something like that when I started my journey as webmaster 🙂
But now I want and I can put this website at your disposal.
Enjoy it 😉


Publicado en Plugins, Temas (Themes), Tutoriales (Tutorials), Wordpress y etiquetado .

Deja un comentario

Tu dirección de correo electrónico no será publicada. Los campos obligatorios están marcados con *