Quantcast
Channel: WordPress.org Forums » All Posts
Viewing all articles
Browse latest Browse all 134322

chadtcd on "Taxonomy Not Loading with Permlink type "Post Name""

$
0
0

Ok, I have been messing with this for like 6 hours and can't find a solutions.

Background:

I have a Custom Post Type called "Client Testimonials" and assigned "Testimonial Category" Taxonomy to it.

I can get "Client Testimonials" to load just fine and click through, also assign the "Testimonial Category" to it and they load on a list page.

But when I try to click on one of the "Testimonial Category" it loads a "Not Found".

Example:
http://url.com/client-testimonials/ - Loads Fine
http://url.com/client-testimonials/testimonial-1 - Loads Fine

http://url.com/testimonial-category/attorneys/- "Not Found"

But if I set Perm links to default

http://url.com/?testimonial-category/attorneys/ loads just fine.

Its only when I set Permalinks to "Post name" that it gives not found.

I have tried to clear my .htacces, oblivious loaded permalinks options page to flush.

Here is my code:

Client Testimonials - Custom Post Type

//Client Testimonials
$labels = array(
'name' => _x('Client Testimonials', 'post type general name'),
'singular_name' => _x('Testimonial', 'post type singular name'),
'add_new' => _x('Add New', 'Testimonial'),
'add_new_item' => __('Add New Testimonial'),
'edit_item' => __('Edit Testimonial'),
'new_item' => __('New Testimonial'),
'view_item' => __('View Testimonial'),
'search_items' => __('Search Testimonial'),
'not_found' => __('No videos Testimonial'),
'not_found_in_trash' => __('No Testimonial found in Trash'),
'parent_item_colon' => '',
);

$args = array(
'label' => __('Client Testimonials'),
'labels' => $labels,
'public' => true,
'can_export' => true,
'show_ui' => true,
'capability_type' => 'post',
'hierarchical' => false,
'query_var' => false,
'has_archive' => true,
'supports' => array('title','editor','excerpt','trackbacks','custom-fields','comments','revisions','thumbnail','author','page-attributes'),
'show_in_nav_menus' => false,
'rewrite' => array('slug' => 'client-testimonials'),
);

register_post_type( 'client-testimonials', $args);
flush_rewrite_rules();

Testimonial Category - Taxonomy

add_action( 'init', 'create_testimonial_category', 0 );

function create_testimonial_category() {
register_taxonomy(
'testimonial-category',
'client-testimonials',
array(
'labels' => array(
'name' => _x( 'Testimonial Category', 'taxonomy general name' ),
'singular_name' => _x( 'Testimonial Category', 'taxonomy singular name' ),
'search_items' => __( 'Search Testimonial Category' ),
'all_items' => __( 'All Testimonial Category' ),
'parent_item' => __( 'Parent Testimonial Category' ),
'parent_item_colon' => __( 'Parent Testimonial Category:' ),
'edit_item' => __( 'Edit Testimonial Category' ),
'update_item' => __( 'Update Testimonial Category' ),
'add_new_item' => __( 'Add New Testimonial Category' ),
'new_item_name' => __( 'New Testimonial Category Name' ),
'menu_name' => __( 'Testimonial Category' ),
),
'show_ui' => true,
'show_tagcloud' => false,
'hierarchical' => true
)
);
}
flush_rewrite_rules();


Viewing all articles
Browse latest Browse all 134322

Trending Articles