Last active
May 29, 2018 09:00
-
-
Save DavidPeralvarez/f32df2e92acb772dbca22f25c2c0ee0a to your computer and use it in GitHub Desktop.
Mostrar una plantilla según Post Format
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if ( have_posts() ): | |
while ( have_posts() ): the_post(); | |
//Cargamos una plantilla u otra en función del formato de post | |
//El primer parámetro que recibe es el nombre del directorio que contiene las plantillas | |
get_template_part('template-parts', get_post_format()); | |
endwhile; | |
endif; | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment