[Resolved] Custom Taxonomy Migration

Home Forums Support [Resolved] Custom Taxonomy Migration

Home Forums Support Custom Taxonomy Migration

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #2045419
    Matt Stern

    Hi Guys,

    This is a long shot, but I’m curious if you have any ideas.

    So we’re rebuilding the following site with GP and GB:

    The site uses some custom code to create a custom taxonomy called “Zones.” These zones act sort of like top level categories except that that they don’t have any sub-categories. They seem to just act as a sort of archive heading.

    Sample Zone “Archive” page:

    Here is the code that previous dev. added to functions.php:

    // Custom Taxonomy Code
    add_action( 'init', 'build_taxonomies', 0 );
    function build_taxonomies() {
    	$labels1 = array(
    		'name' => _x( 'Zones', 'taxonomy general name' ),
    		'singular_name' => _x( 'Zone', 'taxonomy singular name' ),
    		'search_items' =>  __( 'Search Zones' ),
    		'all_items' => __( 'All Zones' ),
    		'parent_item' => __( 'Parent Zone' ),
    		'parent_item_colon' => __( 'Parent Zone:' ),
    		'edit_item' => __( 'Edit Zone' ),
    		'update_item' => __( 'Update Zone' ),
    		'add_new_item' => __( 'Add New Zone' ),
    		'new_item_name' => __( 'New Zone Name' ),
    	);
    
    	register_taxonomy(
    		'zone',
    		'post',
    		array(
    			'hierarchical' => true,
    			'labels' => $labels1,
    			'public' => TRUE,
    			'show_ui' => TRUE,
    			'query_var' => 'zone',
    			'rewrite' => true
    		)
    	);
    }

    Is there some way to transfer the existing zones into top level categories? So as to maintain the site structure but move into a better structure for future management?

    I know we could create new top-level categories and simply name them the same as the original Zones, but there are over 75,000 posts on this site, so I’m not sure how we would then go about organizing all the content.

    Any ideas welcome and thanks as always.

    -Matt

    #2045421
    Matt Stern

    I noticed links didnt show up before:

    Site we’re rebuilding here: Inside Pulse

    Zone Example Page: Movies

    #2045650
    David
    Staff
    Customer Support

    Hi there,

    not sure – but maybe this plugin will do what you require:

    https://wordpress.org/plugins/taxonomy-switcher/

    #2047025
    Matt Stern

    Cool, I’ll take a look. Thank you!

    #2047331
    David
    Staff
    Customer Support

    You’re welcome

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.