Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I've been trying to wade my way through learning the ins and outs of taxonomies and how to integrate them into themes and I've run into a pretty basic issue that I can't seem to figure out.

I started working on this in a BuddyPress install using More Taxonomies. After not being able to get the custom template to load (taxonomy-platform.php) using the rewrite slug of platform... www.mydomain.com/wpinstall/platform .... I deleted the taxonomies from More Taxonomies (but not the entries in the database for terms), uninstalled More Taxonomies and entered the Taxonomies into my buddypress functions.php.

First I used

    //hook into the init action and call create_platform_taxonomies when it fires
add_action( 'init', 'create_platform_taxonomies', 0);
//create the non-heirarchical Platforms taxonomy
function create_platform_taxonomies() 
{


  // Adding a taxonomy for Platforms, non heirarchical
$labels = array(
    'name' => _x( 'Platforms', 'taxonomy general name' ),
    'singular_name' => _x( 'Platform', 'taxonomy singular name' ),
    'search_items' =>  __( 'Search Platforms' ),
    'popular_items' => __( 'Popular Platforms' ),
    'all_items' => __( 'All Platforms' ),
    'parent_item' => null,
    'parent_item_colon' => null,
    'edit_item' => __( 'Edit Platform' ), 
    'update_item' => __( 'Update Platform' ),
    'add_new_item' => __( 'Add New Platform' ),
    'new_item_name' => __( 'New Platform Name' ),
    'separate_items_with_commas' => __( 'Separate platforms with commas' ),
    'add_or_remove_items' => __( 'Add or remove platforms' ),
    'choose_from_most_used' => __( 'Choose from the most used platforms' ),
    'menu_name' => __( 'Platforms' ),
  ); 

  register_taxonomy('platform',
    array( 'post', 'page', 'mediapage', 'attachment', 'revision', 'nav_menu_item', 'cheats', 'reviews', 'tutorials' ),
        array(
            'hierarchical' => false,
            'labels' => $labels,
            'show_ui' => true,
            'query_var' => true,
            'rewrite' => array( 'slug' => 'platform' ),
  ));
}

but that still didn't allow it to work properly.

*Let me note here that I have been over-zealous about flushing my rewrites using the Permalinks page save method during this entire process.

I then rolled back to 2010, and entered that same code into functions.php, and tried again, same result. The taxonomy showed up under all the post types, it pulled the old term data from the database, entered into posts correctly, but I could not bring up the taxonomy-platform.php page, always getting a "that page could not be found" error.

so now I wrote what I felt was a much more dumbed down taxonomy and tried that;

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

 function create_testtax_taxonomies() 
 {
 register_taxonomy ( 'testtax', array( 'post', ), 
    array(
        'hierarchical' => false,
        'labels' => array( 'Testtax', ),
        'show_ui' => true,
        'query_var' => true,
        'rewrite' => array( 'slug' => 'testtax' ),
        ));

 }

this showed up (although its titled as a second 'Post Tags' in my Posts post type but I figured that's cause I cut down on labeling so heavily), but displayed the same behavior when trying to navigate to www.mydomain.com/wpinstall/testtax

this is my code for the taxonomy-testtax.php page

<?php

/* This is the custom template for
* the platforms taxonomy. 
*/

get_header(); ?>

        <div id="container">
            <div id="content" role="main">
hello

            </div><!-- #content -->
        </div><!-- #container -->

<?php get_sidebar(); ?>
<?php get_footer(); ?>

Again, for the moment as simple as possible, but I've also used copies of the index and other various loop-enabled pages.

Any help would be appreciated, thanks in advance! Not sure if I'm missing something simple, or skipping a process in properly enabling taxonomies... just not sure.




Adding some more info to expand on some the answers/comments below (can't find a more efficient way to do this)

I had seen a couple posts regarding this kind of issue I noticed some folks were able to flush an entire array of their soft re-write rules from WordPress. I figured I'd see if I could get the same sort of my print out myself. First I added;

add_action('wp_footer', 'show_rewrite_rules');
function show_rewrite_rules(){
  global $wp_rewrite;
  echo "<pre>";
  print_r($wp_rewrite->rules);
  echo "</pre>";
}

So, added that to my Functions.php in 2010 (I'm pretty much keeping my 2010 theme and my BuddyPress install/theme uptodate with all these possible fixes and changes and testing in both - also have disabled plugins again a couple times and done a save as I've tried some of the suggests below). I got this output;

Array
(
    [categories/(.+)/search_type/(.+)/order/(.+)/page/(.+)] => index.php?cat=$matches[1]&search_type=$matches[2]&order=$matches[3]&paged=$matches[4]
    [categories/(.+)/search_type/(.+)/order/(.+)] => index.php?cat=$matches[1]&search_type=$matches[2]&order=$matches[3]
    [categories/(.+)/page/(.+)] => index.php?cat=$matches[1]&paged=$matches[2]
    [categories/(.+)] => index.php?cat=$matches[1]
    [promotion/?$] => index.php?post_type=ps_promotion
    [promotion/feed/(feed|rdf|rss|rss2|atom)/?$] => index.php?post_type=ps_promotion&feed=$matches[1]
    [promotion/(feed|rdf|rss|rss2|atom)/?$] => index.php?post_type=ps_promotion&feed=$matches[1]
    [promotion/page/([0-9]{1,})/?$] => index.php?post_type=ps_promotion&paged=$matches[1]
    [category/(.+?)/feed/(feed|rdf|rss|rss2|atom)/?$] => index.php?category_name=$matches[1]&feed=$matches[2]
    [category/(.+?)/(feed|rdf|rss|rss2|atom)/?$] => index.php?category_name=$matches[1]&feed=$matches[2]
    [category/(.+?)/page/?([0-9]{1,})/?$] => index.php?category_name=$matches[1]&paged=$matches[2]
    [category/(.+?)/?$] => index.php?category_name=$matches[1]
    [tag/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] => index.php?tag=$matches[1]&feed=$matches[2]
    [tag/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] => index.php?tag=$matches[1]&feed=$matches[2]
    [tag/([^/]+)/page/?([0-9]{1,})/?$] => index.php?tag=$matches[1]&paged=$matches[2]
    [tag/([^/]+)/?$] => index.php?tag=$matches[1]
    [type/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] => index.php?post_format=$matches[1]&feed=$matches[2]
    [type/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] => index.php?post_format=$matches[1]&feed=$matches[2]
    [type/([^/]+)/page/?([0-9]{1,})/?$] => index.php?post_format=$matches[1]&paged=$matches[2]
    [type/([^/]+)/?$] => index.php?post_format=$matches[1]
    [cheats/[^/]+/attachment/([^/]+)/?$] => index.php?attachment=$matches[1]
    [cheats/[^/]+/attachment/([^/]+)/trackback/?$] => index.php?attachment=$matches[1]&tb=1
    [cheats/[^/]+/attachment/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] => index.php?attachment=$matches[1]&feed=$matches[2]
    [cheats/[^/]+/attachment/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] => index.php?attachment=$matches[1]&feed=$matches[2]
    [cheats/[^/]+/attachment/([^/]+)/comment-page-([0-9]{1,})/?$] => index.php?attachment=$matches[1]&cpage=$matches[2]
    [cheats/([^/]+)/trackback/?$] => index.php?cheats=$matches[1]&tb=1
    [cheats/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] => index.php?cheats=$matches[1]&feed=$matches[2]
    [cheats/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] => index.php?cheats=$matches[1]&feed=$matches[2]
    [cheats/([^/]+)/page/?([0-9]{1,})/?$] => index.php?cheats=$matches[1]&paged=$matches[2]
    [cheats/([^/]+)/comment-page-([0-9]{1,})/?$] => index.php?cheats=$matches[1]&cpage=$matches[2]
    [cheats/([^/]+)/entry(/(.*))?/?$] => index.php?cheats=$matches[1]&entry=$matches[3]
    [cheats/([^/]+)(/[0-9]+)?/?$] => index.php?cheats=$matches[1]&page=$matches[2]
    [cheats/[^/]+/([^/]+)/?$] => index.php?attachment=$matches[1]
    [cheats/[^/]+/([^/]+)/trackback/?$] => index.php?attachment=$matches[1]&tb=1
    [cheats/[^/]+/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] => index.php?attachment=$matches[1]&feed=$matches[2]
    [cheats/[^/]+/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] => index.php?attachment=$matches[1]&feed=$matches[2]
    [cheats/[^/]+/([^/]+)/comment-page-([0-9]{1,})/?$] => index.php?attachment=$matches[1]&cpage=$matches[2]
    [reviews/[^/]+/attachment/([^/]+)/?$] => index.php?attachment=$matches[1]
    [reviews/[^/]+/attachment/([^/]+)/trackback/?$] => index.php?attachment=$matches[1]&tb=1
    [reviews/[^/]+/attachment/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] => index.php?attachment=$matches[1]&feed=$matches[2]
    [reviews/[^/]+/attachment/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] => index.php?attachment=$matches[1]&feed=$matches[2]
    [reviews/[^/]+/attachment/([^/]+)/comment-page-([0-9]{1,})/?$] => index.php?attachment=$matches[1]&cpage=$matches[2]
    [reviews/([^/]+)/trackback/?$] => index.php?reviews=$matches[1]&tb=1
    [reviews/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] => index.php?reviews=$matches[1]&feed=$matches[2]
    [reviews/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] => index.php?reviews=$matches[1]&feed=$matches[2]
    [reviews/([^/]+)/page/?([0-9]{1,})/?$] => index.php?reviews=$matches[1]&paged=$matches[2]
    [reviews/([^/]+)/comment-page-([0-9]{1,})/?$] => index.php?reviews=$matches[1]&cpage=$matches[2]
    [reviews/([^/]+)/entry(/(.*))?/?$] => index.php?reviews=$matches[1]&entry=$matches[3]
    [reviews/([^/]+)(/[0-9]+)?/?$] => index.php?reviews=$matches[1]&page=$matches[2]
    [reviews/[^/]+/([^/]+)/?$] => index.php?attachment=$matches[1]
    [reviews/[^/]+/([^/]+)/trackback/?$] => index.php?attachment=$matches[1]&tb=1
    [reviews/[^/]+/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] => index.php?attachment=$matches[1]&feed=$matches[2]
    [reviews/[^/]+/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] => index.php?attachment=$matches[1]&feed=$matches[2]
    [reviews/[^/]+/([^/]+)/comment-page-([0-9]{1,})/?$] => index.php?attachment=$matches[1]&cpage=$matches[2]
    [tutorials/[^/]+/attachment/([^/]+)/?$] => index.php?attachment=$matches[1]
    [tutorials/[^/]+/attachment/([^/]+)/trackback/?$] => index.php?attachment=$matches[1]&tb=1
    [tutorials/[^/]+/attachment/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] => index.php?attachment=$matches[1]&feed=$matches[2]
    [tutorials/[^/]+/attachment/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] => index.php?attachment=$matches[1]&feed=$matches[2]
    [tutorials/[^/]+/attachment/([^/]+)/comment-page-([0-9]{1,})/?$] => index.php?attachment=$matches[1]&cpage=$matches[2]
    [tutorials/([^/]+)/trackback/?$] => index.php?tutorials=$matches[1]&tb=1
    [tutorials/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] => index.php?tutorials=$matches[1]&feed=$matches[2]
    [tutorials/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] => index.php?tutorials=$matches[1]&feed=$matches[2]
    [tutorials/([^/]+)/page/?([0-9]{1,})/?$] => index.php?tutorials=$matches[1]&paged=$matches[2]
    [tutorials/([^/]+)/comment-page-([0-9]{1,})/?$] => index.php?tutorials=$matches[1]&cpage=$matches[2]
    [tutorials/([^/]+)/entry(/(.*))?/?$] => index.php?tutorials=$matches[1]&entry=$matches[3]
    [tutorials/([^/]+)(/[0-9]+)?/?$] => index.php?tutorials=$matches[1]&page=$matches[2]
    [tutorials/[^/]+/([^/]+)/?$] => index.php?attachment=$matches[1]
    [tutorials/[^/]+/([^/]+)/trackback/?$] => index.php?attachment=$matches[1]&tb=1
    [tutorials/[^/]+/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] => index.php?attachment=$matches[1]&feed=$matches[2]
    [tutorials/[^/]+/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] => index.php?attachment=$matches[1]&feed=$matches[2]
    [tutorials/[^/]+/([^/]+)/comment-page-([0-9]{1,})/?$] => index.php?attachment=$matches[1]&cpage=$matches[2]
    [platform/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] => index.php?platform=$matches[1]&feed=$matches[2]
    [platform/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] => index.php?platform=$matches[1]&feed=$matches[2]
    [platform/([^/]+)/page/?([0-9]{1,})/?$] => index.php?platform=$matches[1]&paged=$matches[2]
    [platform/([^/]+)/?$] => index.php?platform=$matches[1]
    [testtax/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] => index.php?testtax=$matches[1]&feed=$matches[2]
    [testtax/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] => index.php?testtax=$matches[1]&feed=$matches[2]
    [testtax/([^/]+)/page/?([0-9]{1,})/?$] => index.php?testtax=$matches[1]&paged=$matches[2]
    [testtax/([^/]+)/?$] => index.php?testtax=$matches[1]
    [promotion/[^/]+/attachment/([^/]+)/?$] => index.php?attachment=$matches[1]
    [promotion/[^/]+/attachment/([^/]+)/trackback/?$] => index.php?attachment=$matches[1]&tb=1
    [promotion/[^/]+/attachment/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] => index.php?attachment=$matches[1]&feed=$matches[2]
    [promotion/[^/]+/attachment/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] => index.php?attachment=$matches[1]&feed=$matches[2]
    [promotion/[^/]+/attachment/([^/]+)/comment-page-([0-9]{1,})/?$] => index.php?attachment=$matches[1]&cpage=$matches[2]
    [promotion/([^/]+)/trackback/?$] => index.php?ps_promotion=$matches[1]&tb=1
    [promotion/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] => index.php?ps_promotion=$matches[1]&feed=$matches[2]
    [promotion/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] => index.php?ps_promotion=$matches[1]&feed=$matches[2]
    [promotion/([^/]+)/page/?([0-9]{1,})/?$] => index.php?ps_promotion=$matches[1]&paged=$matches[2]
    [promotion/([^/]+)/comment-page-([0-9]{1,})/?$] => index.php?ps_promotion=$matches[1]&cpage=$matches[2]
    [promotion/([^/]+)/entry(/(.*))?/?$] => index.php?ps_promotion=$matches[1]&entry=$matches[3]
    [promotion/([^/]+)(/[0-9]+)?/?$] => index.php?ps_promotion=$matches[1]&page=$matches[2]
    [promotion/[^/]+/([^/]+)/?$] => index.php?attachment=$matches[1]
    [promotion/[^/]+/([^/]+)/trackback/?$] => index.php?attachment=$matches[1]&tb=1
    [promotion/[^/]+/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] => index.php?attachment=$matches[1]&feed=$matches[2]
    [promotion/[^/]+/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] => index.php?attachment=$matches[1]&feed=$matches[2]
    [promotion/[^/]+/([^/]+)/comment-page-([0-9]{1,})/?$] => index.php?attachment=$matches[1]&cpage=$matches[2]
    [promotions/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] => index.php?promotion-categories=$matches[1]&feed=$matches[2]
    [promotions/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] => index.php?promotion-categories=$matches[1]&feed=$matches[2]
    [promotions/([^/]+)/page/?([0-9]{1,})/?$] => index.php?promotion-categories=$matches[1]&paged=$matches[2]
    [promotions/([^/]+)/?$] => index.php?promotion-categories=$matches[1]
    [(.+)/entry/%entry%/feed/(feed|rdf|rss|rss2|atom)/?$] => index.php?%entry%$matches[1]&feed=$matches[2]
    [(.+)/entry/%entry%/(feed|rdf|rss|rss2|atom)/?$] => index.php?%entry%$matches[1]&feed=$matches[2]
    [(.+)/entry/%entry%/page/?([0-9]{1,})/?$] => index.php?%entry%$matches[1]&paged=$matches[2]
    [(.+)/entry/%entry%/?$] => index.php?%entry%$matches[1]
    [.*wp-atom.php$] => index.php?feed=atom
    [.*wp-rdf.php$] => index.php?feed=rdf
    [.*wp-rss.php$] => index.php?feed=rss
    [.*wp-rss2.php$] => index.php?feed=rss2
    [.*wp-feed.php$] => index.php?feed=feed
    [.*wp-commentsrss2.php$] => index.php?feed=rss2&withcomments=1
    [feed/(feed|rdf|rss|rss2|atom)/?$] => index.php?&feed=$matches[1]
    [(feed|rdf|rss|rss2|atom)/?$] => index.php?&feed=$matches[1]
    [page/?([0-9]{1,})/?$] => index.php?&paged=$matches[1]
    [comments/feed/(feed|rdf|rss|rss2|atom)/?$] => index.php?&feed=$matches[1]&withcomments=1
    [comments/(feed|rdf|rss|rss2|atom)/?$] => index.php?&feed=$matches[1]&withcomments=1
    [comments/page/?([0-9]{1,})/?$] => index.php?&paged=$matches[1]
    [search/(.+)/feed/(feed|rdf|rss|rss2|atom)/?$] => index.php?s=$matches[1]&feed=$matches[2]
    [search/(.+)/(feed|rdf|rss|rss2|atom)/?$] => index.php?s=$matches[1]&feed=$matches[2]
    [search/(.+)/page/?([0-9]{1,})/?$] => index.php?s=$matches[1]&paged=$matches[2]
    [search/(.+)/?$] => index.php?s=$matches[1]
    [author/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] => index.php?author_name=$matches[1]&feed=$matches[2]
    [author/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] => index.php?author_name=$matches[1]&feed=$matches[2]
    [author/([^/]+)/page/?([0-9]{1,})/?$] => index.php?author_name=$matches[1]&paged=$matches[2]
    [author/([^/]+)/?$] => index.php?author_name=$matches[1]
    [([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/feed/(feed|rdf|rss|rss2|atom)/?$] => index.php?year=$matches[1]&monthnum=$matches[2]&day=$matches[3]&feed=$matches[4]
    [([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/(feed|rdf|rss|rss2|atom)/?$] => index.php?year=$matches[1]&monthnum=$matches[2]&day=$matches[3]&feed=$matches[4]
    [([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/page/?([0-9]{1,})/?$] => index.php?year=$matches[1]&monthnum=$matches[2]&day=$matches[3]&paged=$matches[4]
    [([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/?$] => index.php?year=$matches[1]&monthnum=$matches[2]&day=$matches[3]
    [([0-9]{4})/([0-9]{1,2})/feed/(feed|rdf|rss|rss2|atom)/?$] => index.php?year=$matches[1]&monthnum=$matches[2]&feed=$matches[3]
    [([0-9]{4})/([0-9]{1,2})/(feed|rdf|rss|rss2|atom)/?$] => index.php?year=$matches[1]&monthnum=$matches[2]&feed=$matches[3]
    [([0-9]{4})/([0-9]{1,2})/page/?([0-9]{1,})/?$] => index.php?year=$matches[1]&monthnum=$matches[2]&paged=$matches[3]
    [([0-9]{4})/([0-9]{1,2})/?$] => index.php?year=$matches[1]&monthnum=$matches[2]
    [([0-9]{4})/feed/(feed|rdf|rss|rss2|atom)/?$] => index.php?year=$matches[1]&feed=$matches[2]
    [([0-9]{4})/(feed|rdf|rss|rss2|atom)/?$] => index.php?year=$matches[1]&feed=$matches[2]
    [([0-9]{4})/page/?([0-9]{1,})/?$] => index.php?year=$matches[1]&paged=$matches[2]
    [([0-9]{4})/?$] => index.php?year=$matches[1]
    [[0-9]{4}/[0-9]{1,2}/[0-9]{1,2}/[^/]+/attachment/([^/]+)/?$] => index.php?attachment=$matches[1]
    [[0-9]{4}/[0-9]{1,2}/[0-9]{1,2}/[^/]+/attachment/([^/]+)/trackback/?$] => index.php?attachment=$matches[1]&tb=1
    [[0-9]{4}/[0-9]{1,2}/[0-9]{1,2}/[^/]+/attachment/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] => index.php?attachment=$matches[1]&feed=$matches[2]
    [[0-9]{4}/[0-9]{1,2}/[0-9]{1,2}/[^/]+/attachment/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] => index.php?attachment=$matches[1]&feed=$matches[2]
    [[0-9]{4}/[0-9]{1,2}/[0-9]{1,2}/[^/]+/attachment/([^/]+)/comment-page-([0-9]{1,})/?$] => index.php?attachment=$matches[1]&cpage=$matches[2]
    [([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/([^/]+)/trackback/?$] => index.php?year=$matches[1]&monthnum=$matches[2]&day=$matches[3]&name=$matches[4]&tb=1
    [([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] => index.php?year=$matches[1]&monthnum=$matches[2]&day=$matches[3]&name=$matches[4]&feed=$matches[5]
    [([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] => index.php?year=$matches[1]&monthnum=$matches[2]&day=$matches[3]&name=$matches[4]&feed=$matches[5]
    [([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/([^/]+)/page/?([0-9]{1,})/?$] => index.php?year=$matches[1]&monthnum=$matches[2]&day=$matches[3]&name=$matches[4]&paged=$matches[5]
    [([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/([^/]+)/comment-page-([0-9]{1,})/?$] => index.php?year=$matches[1]&monthnum=$matches[2]&day=$matches[3]&name=$matches[4]&cpage=$matches[5]
    [([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/([^/]+)/entry(/(.*))?/?$] => index.php?year=$matches[1]&monthnum=$matches[2]&day=$matches[3]&name=$matches[4]&entry=$matches[6]
    [([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/([^/]+)(/[0-9]+)?/?$] => index.php?year=$matches[1]&monthnum=$matches[2]&day=$matches[3]&name=$matches[4]&page=$matches[5]
    [[0-9]{4}/[0-9]{1,2}/[0-9]{1,2}/[^/]+/([^/]+)/?$] => index.php?attachment=$matches[1]
    [[0-9]{4}/[0-9]{1,2}/[0-9]{1,2}/[^/]+/([^/]+)/trackback/?$] => index.php?attachment=$matches[1]&tb=1
    [[0-9]{4}/[0-9]{1,2}/[0-9]{1,2}/[^/]+/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] => index.php?attachment=$matches[1]&feed=$matches[2]
    [[0-9]{4}/[0-9]{1,2}/[0-9]{1,2}/[^/]+/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] => index.php?attachment=$matches[1]&feed=$matches[2]
    [[0-9]{4}/[0-9]{1,2}/[0-9]{1,2}/[^/]+/([^/]+)/comment-page-([0-9]{1,})/?$] => index.php?attachment=$matches[1]&cpage=$matches[2]
    [([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/comment-page-([0-9]{1,})/?$] => index.php?year=$matches[1]&monthnum=$matches[2]&day=$matches[3]&cpage=$matches[4]
    [([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/entry(/(.*))?/?$] => index.php?year=$matches[1]&monthnum=$matches[2]&day=$matches[3]&entry=$matches[5]
    [([0-9]{4})/([0-9]{1,2})/comment-page-([0-9]{1,})/?$] => index.php?year=$matches[1]&monthnum=$matches[2]&cpage=$matches[3]
    [([0-9]{4})/([0-9]{1,2})/entry(/(.*))?/?$] => index.php?year=$matches[1]&monthnum=$matches[2]&entry=$matches[4]
    [([0-9]{4})/comment-page-([0-9]{1,})/?$] => index.php?year=$matches[1]&cpage=$matches[2]
    [([0-9]{4})/entry(/(.*))?/?$] => index.php?year=$matches[1]&entry=$matches[3]
    [.+?/attachment/([^/]+)/?$] => index.php?attachment=$matches[1]
    [.+?/attachment/([^/]+)/trackback/?$] => index.php?attachment=$matches[1]&tb=1
    [.+?/attachment/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] => index.php?attachment=$matches[1]&feed=$matches[2]
    [.+?/attachment/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] => index.php?attachment=$matches[1]&feed=$matches[2]
    [.+?/attachment/([^/]+)/comment-page-([0-9]{1,})/?$] => index.php?attachment=$matches[1]&cpage=$matches[2]
    [(.+?)/trackback/?$] => index.php?pagename=$matches[1]&tb=1
    [(.+?)/feed/(feed|rdf|rss|rss2|atom)/?$] => index.php?pagename=$matches[1]&feed=$matches[2]
    [(.+?)/(feed|rdf|rss|rss2|atom)/?$] => index.php?pagename=$matches[1]&feed=$matches[2]
    [(.+?)/page/?([0-9]{1,})/?$] => index.php?pagename=$matches[1]&paged=$matches[2]
    [(.+?)/comment-page-([0-9]{1,})/?$] => index.php?pagename=$matches[1]&cpage=$matches[2]
    [(.+?)(/[0-9]+)?/?$] => index.php?pagename=$matches[1]&page=$matches[2]
)

So I see Platform and Testtax in there, they don't have as many lines as the rewrites for my custom post types, however from what I can tell it looks like they do have rules that should make this work.

share|improve this question
    
Let me also point out that I tried this with all plugins disabled in 2010 with both taxonomies. –  Duiwel Apr 27 '11 at 3:53
    
I would make sure there is a post / page with a taxonomy term assigned to it. Then refresh your permalink structure and try again. –  Cristian Apr 27 '11 at 12:42
    
I already had the original Taxonomy, 'Platforms' with a full list of terms and added to a number of posts. I went ahead and added terms to my 'testtax' taxonomy, and added them to some posts. Saved my Permalink structure, no change. –  Duiwel Apr 28 '11 at 19:02
add comment

3 Answers

up vote 2 down vote accepted

I found this code;

function ftc_flush_rewrites() {
global $wp_rewrite;
$wp_rewrite->flush_rules();
}

function ftc_add_rewrites() {
global $wp_rewrite;
$ftc_new_non_wp_rules = array(
'find/(this)' => '/addit.php?here=$1',
);

$wp_rewrite->non_wp_rules = $ftc_new_non_wp_rules + $wp_rewrite->non_wp_rules;
}

add_action('generate_rewrite_rules', 'ftc_add_rewrites');
add_action('admin_init', 'ftc_flush_rewrites');

in this thread http://wordpress.org/support/topic/writing-wp_rewrite-gtnon_wp_rules-to-htaccess ...not sure if that addresses the problem but good luck!

share|improve this answer
1  
hi @KeithComito I think what you're getting at here is for my to write a custom permalink and hardcode it into .htaccess myself. I considered something like that, but in the same way I considered using a conditional tag on the index page... I mean, unless I'm completely missing the point & implementation method for custom templates for taxonomies in the template hierarchy I'd rather focus on getting that working now instead of causing myself more headaches in the future ;) –  Duiwel Apr 30 '11 at 1:45
    
Any solution? Please mark something as solved or add your own answer and mark this one as solution. –  kaiser Oct 24 '11 at 12:58
add comment

The /platform page doesn't exist because WordPress doesn't just make a page based off your URL structure.

You can create a "Page" called "platform" if you need to show content there.

taxonomy-platform.php is the default template for term archives within the platform taxonomy.

taxonomy-platform-some_term.php is the archive template for one specific term.

All WordPress archive templates are for term archives. WordPress does not have a built in way to associate taxonomy names with posts only taxonomy terms can be associated with posts.

Taxonomy name = platform

  • some-platform (platform term)

URL = http://some-domain.com/platform/some-platform

will list all the post with the some-platform taxonomy term

It is possible to remove the "platform" slug front but it is not possible to have a taxonomy archive page of:

http://some-domain.com/platform/

and get an archive all posts that have the platform taxonomy associated with it without creating a platform page with a custom template to make the necessary queries.

Your template taxonomy-platform.php will be used for any platform term archive pages.

share|improve this answer
    
Oh, OH! Hah, thank you so much Chris, I knew I had to be missing something basic. So, if I click on a term, Wordpress first looks for that specific term template, then moves up the hierarchy, but to build a specific archive for that whole taxonomy I need to make the page with a custom query for that Taxonomy. I think I've got the jist of it now. Thanks again! (Oh, BTW -- My apologies for deleting your edit, I was just sort of futzing with the system and I didn't realize removing it once would make it impossible to restore) –  Duiwel Apr 30 '11 at 3:10
    
Unfortunately that's true. I think it's a feature that should be implemented in core WordPress. There's even a discussion of the idea at wordpress.org/extend/ideas/topic/taxonomy-archive-template –  TechAurelian Nov 16 '12 at 14:57
add comment

Try this one:

/**
* flush_rewrite_rules()
* Flush the rewrite rules, which forces the regeneration with new rules.
* return void.
**/
function flush_rewrite_rules() 
{
    global $wp_rewrite;
    $wp_rewrite->flush_rules();
}
share|improve this answer
    
Hey thanks for response. I put that piece of code in my functions.php (have to rename it to flush_rewrite_rules_again). That didn't seem to do anything, so I added <?php if ( get_option('permalink_structure') != '' ) { echo 'permalinks enabled'; } ?> and it does say 'permalinks enabled' –  Duiwel Apr 30 '11 at 0:51
    
added some additional info to my top post –  Duiwel Apr 30 '11 at 0:57
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.