added template for frontpage widgets

This commit is contained in:
jorge 2022-12-23 08:04:35 +01:00
parent fcb0f55a93
commit 21b46b335f
2 changed files with 31 additions and 6 deletions

View File

@ -16,22 +16,25 @@ get_header();
?>
<main id="primary" class="site-main">
<?php
//if ( have_posts() ) :
while ( have_posts() ) :
the_post();
get_template_part( 'template-parts/content', 'page' );
// If comments are open or we have at least one comment, load up the comment template.
if ( comments_open() || get_comments_number() ) :
comments_template();
endif;
endwhile; // End of the loop.
?>
</main><!-- #main -->
<?php
if ( is_front_page() ) :
get_template_part( 'template-parts/frontpage', 'widgets' );
endif;
?>
<?php
//endif; // End if have_post.
?>
<?php
get_sidebar();

View File

@ -0,0 +1,22 @@
<?php
/**
* Template part for displaying widgets if we are in front_page
*
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/
*
* @package Oficina_de_Suport_theme
*/
?>
<aside id="destacats" class="">
<header class="entry-header">
<h2>Destacats</h2>
</header><!-- .entry-header -->
<div class="entry-content">
<p> cadascuna de les entrades</p>
</div><!-- .entry-content -->
<footer class="entry-footer">
</footer><!-- .entry-footer -->
</aside>