• Hi together,

    I have an WordPress template that is giving me my own WordPress taxonomies category overview (it shows all categories):

    $args = array(
        'taxonomy'     => $taxonomy,
        'depth'        => $depth,
        'orderby'      => $orderby,
        'show_count'   => $show_count,
        'pad_counts'   => $pad_counts,
        'hierarchical' => $hierarchical,
        'title_li'     => $title
    );
    
    $categories   = get_categories($args);

    And then I show:

    foreach ($categories as $category) { // bla bla }
    Everything is fine. But now I want to do this: On click on the category name it shall open “mywp.com/taxonomy-overview/taxonomy-1” and show all taxonomy items.

    How can I add this functionality into my taxonomy-cat.php template? First, I have to make an URL with the ID of the portfolio

    $url = get_permalink( $post->ID ).$category->term_id;

    This gives me /taxonomy-overview/1 but if I click on it, I get a 404. How can I tell my WordPress, that it should call a new template file, e.g. “taxonomy-list.php”? And how do I fetch the Taxonomy ID from the URL? And how do I make the “SEO” (mod_rewrite) URL on my -cat.php template?

    Edit: my taxonomy-cat.php is a page layout so it’s assigned to a page…

  • The topic ‘Own taxonomy category overview template’ is closed to new replies.