getButterfly Logo

How to create a taxonomy template

If you are not usingĀ Noir UI theme, you can easily create a taxonomy page for any theme and view the image archive/category using the ImagePress grid.

* ImagePress taxonomy template
* Taxonomy template with queried parameter as shortcode argument.
* @package ImagePress
* @subpackage Template
* @since 7.0.0

<?php get_header(); ?>

<section id="content-wide" class="taxonomy" role="main">
    <h1 class="entry-title"><?php echo get_queried_object()->name; ?></h1>
    // Get taxonomy term from WordPress query
    $ip_taxonomy_term = sanitize_title(get_queried_object()->name);

    // Display shortcode based on queried taxonomy term
    echo do_shortcode('[imagepress-loop category="' . $ip_taxonomy_term . '"]');

<?php get_footer(); ?>

Note that you might need to make some changes in order to accommodate your theme’s structure.