Añade nueva página de inicio y mejoras de estilo

This commit is contained in:
Manuel Cillero 2021-08-03 21:05:18 +02:00
parent 6f9b7ff421
commit 2394be9383
9 changed files with 357 additions and 113 deletions

View file

@ -24,19 +24,19 @@ if( $flexible_posts->have_posts() ):
<?php while( $flexible_posts->have_posts() ) : $flexible_posts->the_post(); global $post; ?>
<li id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<a href="<?php echo the_permalink(); ?>">
<?php
if( $thumbnail == true ) {
// If the post has a feature image, show it
if( has_post_thumbnail() ) {
the_post_thumbnail( $thumbsize );
// Else if the post has a mime type that starts with "image/" then show the image directly.
} elseif( 'image/' == substr( $post->post_mime_type, 0, 6 ) ) {
echo wp_get_attachment_image( $post->ID, $thumbsize );
}
<?php
if( $thumbnail == true ) {
// If the post has a feature image, show it
if( has_post_thumbnail() ) {
the_post_thumbnail( $thumbsize );
// Else if the post has a mime type that starts with "image/" then show the image directly.
} elseif( 'image/' == substr( $post->post_mime_type, 0, 6 ) ) {
echo wp_get_attachment_image( $post->ID, $thumbsize );
}
?>
<h4 class="title"><?php the_title(); ?></h4>
<p class="meta"><?php echo 'desde '; the_time('F \d\e Y'); ?></p>
}
?>
<h4 class="title<?php if( $thumbnail ) echo ' with_thumbnail'; ?>"><?php the_title(); ?></h4>
<p class="meta<?php if( $thumbnail ) echo ' with_thumbnail'; ?>"><?php echo 'desde '; the_time('F \d\e Y'); ?></p>
</a>
</li>
<?php endwhile; ?>