created front template to show featured-artworks

This commit is contained in:
jorge 2022-04-11 14:17:20 +02:00
parent 31f6747df0
commit b4a8701516
3 changed files with 18 additions and 2 deletions

View File

@ -19,6 +19,16 @@ get_header(); ?>
<?php get_template_part( 'template-parts/home', 'announcement-middle' ); ?> <?php get_template_part( 'template-parts/home', 'announcement-middle' ); ?>
<article>
<main>
<?php
//https://developer.wordpress.org/reference/functions/get_template_part/#comment-4130
get_template_part( 'template-parts/section', 'categoryposts', array('category_name' => 'featured-artworks', 'post_per_page' => '6' ) );
?>
</main>
</article>
<?php get_template_part( 'template-parts/home', 'announcement-last' ); ?> <?php get_template_part( 'template-parts/home', 'announcement-last' ); ?>
<?php get_footer(); <?php get_footer();

View File

@ -46,7 +46,13 @@
</a> </a>
<?php endif;?> <?php endif;?>
<h5 class="date"> <h5 class="date">
<?php //the_date('d.m.Y');?> <?php
if ( is_category( 'news' ) ):
the_date('d.m.Y');
else:
the_date('Y');
endif;
?>
</h5> </h5>
<h3 class="entry-title"> <h3 class="entry-title">
<a href="<?php the_permalink(); ?>" rel="bookmark"> <a href="<?php the_permalink(); ?>" rel="bookmark">

View File

@ -45,7 +45,7 @@
</a> </a>
<?php endif;?> <?php endif;?>
<h5 class="date"> <h5 class="date">
<?php //the_date('d.m.Y');?> <?php the_date('Y');?>
</h5> </h5>
<h3 class="entry-title"> <h3 class="entry-title">
<a href="<?php the_permalink(); ?>" rel="bookmark"> <a href="<?php the_permalink(); ?>" rel="bookmark">