Add taxonomy name taxonomy template/partial args

This commit is contained in:
Tetrakern 2024-10-06 16:22:54 +02:00
parent cc9e62d8b5
commit 032eca5086
8 changed files with 12 additions and 7 deletions

View File

@ -150,6 +150,7 @@ Archive template hook. Fires right after the result loop section in any archive
* $order (string) Current order query argument. Default 'desc'. * $order (string) Current order query argument. Default 'desc'.
* $orderby (string) Current orderby query argument. Default 'date'. * $orderby (string) Current orderby query argument. Default 'date'.
* $ago (int|string) Current value for the date query. Default 0. * $ago (int|string) Current value for the date query. Default 0.
* $taxonomy (string) Current taxonomy.
--- ---
@ -161,6 +162,7 @@ Archive template hook. Fires right before the result loop section in any archive
* $order (string) Current order query argument. Default 'desc'. * $order (string) Current order query argument. Default 'desc'.
* $orderby (string) Current orderby query argument. Default 'date'. * $orderby (string) Current orderby query argument. Default 'date'.
* $ago (int|string) Current value for the date query. Default 0. * $ago (int|string) Current value for the date query. Default 0.
* $taxonomy (string) Current taxonomy.
**Hooked Actions:** **Hooked Actions:**
* `fictioneer_sort_order_filter_interface( $args )` Interface to sort, order, and filter. Priority 10. * `fictioneer_sort_order_filter_interface( $args )` Interface to sort, order, and filter. Priority 10.

View File

@ -69,7 +69,7 @@ get_header();
</div> </div>
</header> </header>
<?php get_template_part( 'partials/_archive-loop' ); ?> <?php get_template_part( 'partials/_archive-loop', null, array( 'taxonomy' => 'category' ) ); ?>
</article> </article>

View File

@ -13,6 +13,8 @@
* @see taxonomy-fcn_content_warning.php * @see taxonomy-fcn_content_warning.php
* @see taxonomy-fcn_fandom.php * @see taxonomy-fcn_fandom.php
* @see taxonomy-fcn_genre.php * @see taxonomy-fcn_genre.php
*
* @internal $args['taxonomy'] The current taxonomy type.
*/ */
@ -31,7 +33,8 @@ $hook_args = array(
'page' => $page, 'page' => $page,
'order' => $order, 'order' => $order,
'orderby' => $orderby, 'orderby' => $orderby,
'ago' => $ago 'ago' => $ago,
'taxonomy' => $args['taxonomy']
); );
?> ?>

View File

@ -77,7 +77,7 @@ get_header();
</div> </div>
</header> </header>
<?php get_template_part( 'partials/_archive-loop' ); ?> <?php get_template_part( 'partials/_archive-loop', null, array( 'taxonomy' => 'post_tag' ) ); ?>
</article> </article>

View File

@ -78,7 +78,7 @@ get_header();
</div> </div>
</header> </header>
<?php get_template_part( 'partials/_archive-loop' ); ?> <?php get_template_part( 'partials/_archive-loop', null, array( 'taxonomy' => 'fcn_character' ) ); ?>
</article> </article>

View File

@ -78,7 +78,7 @@ get_header();
</div> </div>
</header> </header>
<?php get_template_part( 'partials/_archive-loop' ); ?> <?php get_template_part( 'partials/_archive-loop', null, array( 'taxonomy' => 'fcn_content_warning' ) ); ?>
</article> </article>

View File

@ -78,7 +78,7 @@ get_header();
</div> </div>
</header> </header>
<?php get_template_part( 'partials/_archive-loop' ); ?> <?php get_template_part( 'partials/_archive-loop', null, array( 'taxonomy' => 'fcn_fandom' ) ); ?>
</article> </article>

View File

@ -78,7 +78,7 @@ get_header();
</div> </div>
</header> </header>
<?php get_template_part( 'partials/_archive-loop' ); ?> <?php get_template_part( 'partials/_archive-loop', null, array( 'taxonomy' => 'fcn_genre' ) ); ?>
</article> </article>