Support » Fixing WordPress » How does WordPress check for updated taxonomy SLUGS?

  • Resolved openwp3


    I have a taxonomy similar to Categories that’s working fine. But when I change the SLUG of a term, Objects no longer show up on the Taxonomy’s result page (or the original results, with the old slug).

    I logged into PHPMYADMIN and the old slug is not listed in: _wp_old_slug

    Would I need a function using wp_check_for_changed_slugs? Can that work?

    Is there a way to check for old and new slugs for anything: Tags, Categories, Taxonomies, etc?

    I’m using pre_get_posts for the Custom Taxonomy $query and that’s working great otherwise, only breaks when I change the term SLUG.

    Any ideas?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Are you the author that built the theme you are using?

    In all my past experience I have not had to do any updated check.

    Yes I am. I created a custom taxonomy and for some reason, when the SLUG changes, posts won’t display.

    But I was just reading about a possible alternative way of doing this. The custom taxonomy is for attachments, and read how about how, in the newer version of WordPress, it’s easier to connect already registered Taxonomies (i.e. Categories), to already registered Post Types (Attachments).

    Only issue then would be how to use a different template file for archives display when is_attachment?

    Any idea how I can use a template file other than: category.php for any term when is_attachment?

    Ok, I decided to register an existing Taxonomy to attachments:

    register_taxonomy_for_object_type( 'category', 'attachment' );

    I believe the issue I was having may have been because of the naming scheme I choose for the custom taxonomy. The slug was very unique, but the word “Category” was included in the full display name, so I think WordPress was getting confused when I added terms/edited slugs.

    This seems a much better solution anyway.

    Hope it helps someone else out.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How does WordPress check for updated taxonomy SLUGS?’ is closed to new replies.