I am pretty new in WordPress theme development and I have some doubt about this WP function used to show my post in the homepage:
<?php 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() ); endwhile; // Previous/next post navigation. twentyfourteen_paging_nav(); else : // If no content, include the "No posts found" template. get_template_part( 'content', 'none' ); endif; ?>
Intuitively I understood that as long as there are posts these are displayed in the homepage.
My doubt is related about this line of code:
get_template_part( 'content', get_post_format() );
Reading the documentation it seems to me that:
1) get_template_part: Load a template part into a template. So I think that by this line I am including a template part used to show a post (the structure of a post into my homepage), is it correct?
2) What exactly do get_post_format() ?