Support » Themes and Templates » Don't understand the instructions for "ost format specific"

  • I am creating a child theme base on 2014 what do they mean a “post format specific” Please?

    			if ( have_posts() ) :
    				// Start the Loop.
    				while ( have_posts() ) : the_post();
    					 * Include the post format-specific template for the content. If you want to
    					 * use this in a child theme, then include a file called called content-___.php
    					 * (where ___ is the post format) and that will be used instead.
    					get_template_part( 'content', get_post_format() );
    				// Previous/next post navigation.
    			else :
    				// If no content, include the "No posts found" template.
    				get_template_part( 'content', 'none' );

    Thank you

Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator stephencottontail


    WordPress posts can be in a number of different post formats that describe their content: image, video, gallery, etc., and depending on your theme’s design, you may want video posts to look different from all the other types of posts. If you create a file called content-video.php, for example, that file will only be called to display posts in the video format, while content.php will be used to display posts in all other post formats.

    Thank you Stephen. does that mean that I an also just use as is if I don’t want to change it?

    Moderator stephencottontail


    Yep. Your child theme will use content.php by default unless it finds content-video.php or whatever.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Don't understand the instructions for "ost format specific"’ is closed to new replies.