• I’ve set up a custom taxonomy archive page for the taxonomy ‘work-type’. I’m using the following code to output a list of terms in my sidebar:
    https://www.mattpealing-server.co.uk/~devmattp/my-work/

    <?php
    	$terms = get_terms('work-type');
    	$count = count($terms);
    	if ( $count > 0 ){
    	    echo '<ul>';
    	    foreach ( $terms as $term ) {
    	      echo '<li><a href="' . get_term_link($term->slug, 'work-type') . '">' . $term->name . '</a></li>';
    
    	    }
    	    echo '</ul>';
    	}
    ?>

    However, when I click one of the links (e.g. https://www.mattpealing-server.co.uk/~devmattp/work-type/web/) it simply forwards me to a page that just lists all of my default posts.

    Here is the code for taxonomy-work-type.php:

    [71 lines of code moderated as per the Forum Rules. The maximum number of lines of code that you can post in these forums is ten lines. Please use the pastebin]

    Can anyone see what I’m doing wrong?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter 000000000

    (@pealo86)

    A quick update, it doesn’t forward me to a page that lists all of my posts. It strangely forwards me to one particular blog post!

    Thread Starter 000000000

    (@pealo86)

    Okay another update, I’ve just realised the term ‘Web’ was causing the problem. Something WP just didn’t like about it?

    I’ve changed the term to ‘Web Design’ and the forwarding issue seems to have done away.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Trouble With Custom Taxonomy Archive’ is closed to new replies.