Last active
July 13, 2022 18:47
-
-
Save frontend-coder/0a2516a6a0e4bf3aba0004eccc8abe7a to your computer and use it in GitHub Desktop.
36. Як вивести сторінку термов(як сторінка категорій) wordpress #wordpress
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
get_header(); | |
$term = get_term_by( 'slug', get_query_var('term'), get_query_var('taxonomy') ); | |
echo $term -> name; | |
?> | |
<div> | |
<?php if( have_posts() ) : while(have_posts() ) : the_post(); ?> | |
<?php get_template_part('part/content', 'car'); ?> | |
<?php endwhile; else : ?> | |
<?php get_template_part('part/content', 'none'); ?> | |
<?php endif; ?> | |
</div> | |
is_taxonomy_exists(); | |
if(is_singular('car') ) { | |
get_sidebar('car'); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment