Custom category template
-
I’m trying customize my category template to display a list of the current categories child categories.
However, I want to reference some custom variables in the output so can’t usewp_list_categories
. The list will include the tile and link of child category, a thumbnail and the category description.This is what I’ve got so far:
<?php if ( is_category() ); { $cat_id = get_category(get_query_var( 'cat' )); $termchildren = get_term_children( $cat_id, $category );
Can anyone advise me on the best way to do this?
Should I useget_term_by
to return the data for each child category?
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘Custom category template’ is closed to new replies.