Layout for custom taxonomy
-
Running Period Pro. (but version 1.07)
I have added a custom taxonomy to my site called “Trip”. I’d like to use a different layout for it than the “Posts” layout, but when I go into the Customize: Layout settings, I have options for Posts, Pages, Blog, and Archive.
Is there a way to add my custom taxonomy here? Or, is there a way to do the layout in PHP easily? I want to use the one column, wide layout when things are shown using this taxonomy.
As it is, I’ve copied the contents of index.php into my taxonomy-trip.php file (in a child theme), so right now I’m just getting the same layout as… Archive I guess?
Ultimately what I want to do here is to pull some metadata for the taxonomy item from the database and then show (in the loop-container) the various posts that are associated in the taxonomy item.
Thanks!
<?php get_header(); get_template_part( 'content/archive-header' ); do_action( 'after_archive_header' ); ?> <div>TRIP TEMPLATE</div> <div id="loop-container" class="loop-container"> <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ct_period_get_content_template(); endwhile; endif; ?> </div> <?php the_posts_pagination( array( 'prev_text' => esc_html__( 'Previous', 'period' ), 'next_text' => esc_html__( 'Next', 'period' ) ) ); get_footer();
- The topic ‘Layout for custom taxonomy’ is closed to new replies.