Post type archive page not working

Given the standard registration, you should have the following: A post type with the name ‘recipe’ A recipe post archive at example.com/recipe/ Recipe posts with urls that take the form example.com/recipe/helloworldrecipe/ A template archive-recipe.php A template single-recipe.php However, I see this in your registration code: ‘rewrite’ => array(‘slug’ => ”), This suggests what you’re trying … Read more

Count number of post in Taxonomy?

The function you are looking for is get_term() http://codex.wordpress.org/Function_Reference/get_term and the code would look something like this: $term = get_term( 1, ‘category’ );//for example uncategorized category echo ‘count: ‘. $term->count;

How to fix a double slash in custom permalinks with hierarchical taxonomy’s?

There is a quick and somewhat dirty potential solution to this. I say ‘potential’ because I can’t spot the problem by looking at the code. I only have my suspicions. Instead of passing a separator like that. Try trailingslashit. } else $chain .= trailingslashit($name); return $chain; I am guessing at where the problem is based … Read more