• Resolved CallMeAndy

    (@callmeandy)


    I was using a taxonomy that I had named badly and for ages have been meaning to change the name. I thought I would be able to do it via the database directly. Anyway somehow I seem to have bodged up but unless I have overlooked something the tables and row data seam to be as expected and I am not sure what I have overlooked.
    Basically I changed the name from localities to destinations.
    As an example of the relationships that I have considered
    So wp_terms.term_id = 8897, wp_terms.slug = ‘nepal’
    wp_term_taxonomy.term_id =8897, wp_term_taxonomy.term_taxonomy_id = 9122 wp_term_taxonomy.taxonomy = ‘destinations’
    wp_term_realtionship.term_taxonomy_id = 9122, wp_term_realtionship.object_id = 201700
    wp_posts = 201700 i item status publish

    So the post displays correctly, and the byline has the appropriate link showing namely adventurebod.com/blog/destinations/nepal

    However if I try to navigate through that link I get the dreaded “Oops! That page can’t be found.”

    functions.php has

    add_action( 'init', 'destinations_init' );
    
    function destinations_init() {
    	// create a new taxonomy
    	register_taxonomy(
    		'destinations',
    		'post',
    		array(
    			'hierarchical' => true,
    			'label' => __( 'Destinations' ),
    			'query_var' => true,
    			'rewrite' => true
    		)
    	);
    }

    Any help appreciated.
    I might also mention there only three posts for nepal, if i drill into them via the admin interface for posts/destinations the correct three show in the posts list. It seems to be purely the url that has gone belly up – is there something I need to do with permalinks perhaps?

Viewing 1 replies (of 1 total)
  • Thread Starter CallMeAndy

    (@callmeandy)

    Ok I will answer my own question!

    The database changes actually worked perfectly. It was my hunch about permalinks that was the issue. I had a feeling, but couldn’t quite reach recollection, that you had to reinitialize permalinks. But I couldn’t see a trigger anywhere in the admin so I was assuming I was confused, of course you reinitialize by changing the URL structure for your permalinks.
    And then changing it back to the desired structure.

    Admin – Settings – Permalinks – Common Settings

    Easy!

Viewing 1 replies (of 1 total)
  • The topic ‘Taxonomy and Terms display issues’ is closed to new replies.