I have been asked to look at an issue for a WordPress website which has a post type called Offers. The offers post type has a few categories attached to it, for example food & drink. The categories are all pulled in on the listing page with the following code:
<?php
//Offers category listing query
$taxonomy = 'offer_category';
$terms = get_terms( $taxonomy, '' );
if ($terms) {
foreach($terms as $term) {
$name = str_replace(' ', '', $term->name);
$class = strtolower($name);
echo '<a class="title" href="' . esc_attr(get_term_link($term, $taxonomy)) . '" title="' . sprintf( __( "View all posts in %s" ), $term->name ) . '" ' . '>';
echo '<div class="offer category '.$class.'">';
echo '<div class="background">';
echo '<a class="title" href="' . esc_attr(get_term_link($term, $taxonomy)) . '" title="' . sprintf( __( "View all posts in %s" ), $term->name ) . '" ' . '>';
echo '<h2>'.$term->name.' »</h2></a>';
echo '<span class="count">'. $term->count .'</span>';
echo '</a></div></div></a>';
}
}
?>
The problem is, on the Offers page, if I click the Food & Drink category link, it just keeps redirecting to the Homepage. This happens for any of the categories under the Offers post type. The thing is, when I hover over the link before clicking, the permalink seems to be set correctly, eg: www.mysite.com/offers_category/food-drink/
I have noticed that the site uses a plugin called More Taxonomies but from what I can see in the settings, there is no reference to the homepage or any explanation as to why this would be redirecting to the Homepage.
I'm just not sure where to go from here, I have had a look on the Apache error logs to see if I can find something but I'm at a loss with it.
I would be extremely grateful if you guys could help me out on this one please and I would be happy to provide any further information required to help solve the problem.
Cheers