57 lines
1.4 KiB
PHP
57 lines
1.4 KiB
PHP
|
<?php
|
||
|
/**
|
||
|
* The template for displaying archive FAQS
|
||
|
*
|
||
|
* Template Name: PAFs, consells, tutorials...
|
||
|
*
|
||
|
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/
|
||
|
*
|
||
|
* @package Oficina_de_Suport_theme
|
||
|
* @since 1.0
|
||
|
*/
|
||
|
|
||
|
get_header();
|
||
|
?>
|
||
|
|
||
|
<main id="primary" class="site-main">
|
||
|
|
||
|
<?php if( in_category('faq') ) : ?>
|
||
|
<nav id="tipus-faqs" class="ofisuport-faqs-types">
|
||
|
<ul class="ofisuport-label">
|
||
|
<?php // https://developer.wordpress.org/reference%2Ffunctions%2Fwp_list_categories%2F/
|
||
|
wp_list_categories(
|
||
|
array(
|
||
|
'child_of' => 1, // category FAQ id=1
|
||
|
'hide_empty' => 0,
|
||
|
'hide_title_if_empty' => true,
|
||
|
'separator' => '<li>',
|
||
|
'style' => 'list',
|
||
|
'taxonomy' => 'category',
|
||
|
'title_li' => '',
|
||
|
)
|
||
|
); ?>
|
||
|
</ul>
|
||
|
</nav>
|
||
|
<?php endif; //end if is_category faq ?>
|
||
|
<content class="archive-posts ">
|
||
|
<?php if ( have_posts() ) : ?>
|
||
|
<?php while ( have_posts() ) : the_post();
|
||
|
|
||
|
get_template_part( 'template-parts/section', 'eachpost' );
|
||
|
|
||
|
endwhile;
|
||
|
|
||
|
the_posts_navigation();
|
||
|
|
||
|
else :
|
||
|
get_template_part( 'template-parts/content', 'none' );
|
||
|
|
||
|
endif;
|
||
|
?>
|
||
|
</content>
|
||
|
</main><!-- #main -->
|
||
|
|
||
|
<?php
|
||
|
get_sidebar();
|
||
|
get_footer();
|