show resources title, category or tag in view
This commit is contained in:
parent
5c05c0f1e3
commit
9398258fb6
|
@ -29,7 +29,8 @@ endif;
|
||||||
<main>
|
<main>
|
||||||
<?php
|
<?php
|
||||||
// https://codex.wordpress.org/Conditional_Tags
|
// https://codex.wordpress.org/Conditional_Tags
|
||||||
if ( is_post_type_archive ( 'archive_resource' ) ) :
|
// if ( is_post_type_archive ( 'archive_resource' ) ) :
|
||||||
|
if ( is_post_type_archive ( 'archive_resource' ) || is_tax( 'archive_resource_category' ) || is_tax( 'archive_resource_tag' ) ) :
|
||||||
//https://developer.wordpress.org/reference/functions/get_template_part/#comment-4130
|
//https://developer.wordpress.org/reference/functions/get_template_part/#comment-4130
|
||||||
//get_template_part( 'template-parts/section', 'resources', array( 'post_per_page' => '10' ) );
|
//get_template_part( 'template-parts/section', 'resources', array( 'post_per_page' => '10' ) );
|
||||||
get_template_part( 'template-parts/archive', 'resources');
|
get_template_part( 'template-parts/archive', 'resources');
|
||||||
|
|
|
@ -27,8 +27,9 @@ get_header(); ?>
|
||||||
<?php echo get_search_query( ); ?>
|
<?php echo get_search_query( ); ?>
|
||||||
</h2>
|
</h2>
|
||||||
</header>
|
</header>
|
||||||
|
<aside class="hero hero-announcement resources">
|
||||||
|
<?php dynamic_sidebar( 'announcement-resources-middle-widgets' ); ?>
|
||||||
|
</aside>
|
||||||
<main class="">
|
<main class="">
|
||||||
<?php if ( have_posts() ) : ?>
|
<?php if ( have_posts() ) : ?>
|
||||||
<?php while ( have_posts() ) : the_post(); ?>
|
<?php while ( have_posts() ) : the_post(); ?>
|
||||||
|
|
|
@ -21,13 +21,18 @@
|
||||||
|
|
||||||
<section class="archive-posts resources">
|
<section class="archive-posts resources">
|
||||||
<header>
|
<header>
|
||||||
<h2>
|
<h2>Resources <?php //post_type_archive_title(); ?></h2>
|
||||||
<?php
|
<?php
|
||||||
if ( is_post_type_archive() ):
|
if ( is_tax( 'archive_resource_category' ) ):
|
||||||
post_type_archive_title();
|
echo '<h4 class="">';
|
||||||
|
single_cat_title( '<span class="h6">category:</span> ' );
|
||||||
|
echo '</h4>';
|
||||||
|
elseif ( is_tax( 'archive_resource_tag' ) ):
|
||||||
|
echo '<h4 class="">';
|
||||||
|
single_term_title( '<span class="h5">#</span>' );
|
||||||
|
echo '</h4>';
|
||||||
endif;
|
endif;
|
||||||
?>
|
?>
|
||||||
</h2>
|
|
||||||
</header>
|
</header>
|
||||||
<aside class="hero hero-announcement resources">
|
<aside class="hero hero-announcement resources">
|
||||||
<?php dynamic_sidebar( 'announcement-resources-middle-widgets' ); ?>
|
<?php dynamic_sidebar( 'announcement-resources-middle-widgets' ); ?>
|
||||||
|
|
Loading…
Reference in New Issue