WordPress.org

Ready to get started?Download WordPress

Forums

CPT-onomies: Using Custom Post Types as Taxonomies
[resolved] Not updating wp_term_relationships (5 posts)

  1. Jonathan Ogden
    Member
    Posted 2 years ago #

    Hi Rachel!

    Let me continue the trend of thanking you for an amazing plugin. It absolutely has met a need as I am relating products to stores and product categories, and stores to product categories, etc.

    As I continue to utilize it, I think I have noticed that it has stopped updating wp_term_relationships when I execute wp_insert_post and corresponding $cpt_onomy->wp_set_object_terms It has continued to update wp_post_meta

    I have promptly updated the plugin at each update from 1.0.1 to 1.0.2 and to 1.0.3 which is running currently. wp_term_relationships was being updated February 24, but not since.

    Perhaps I am missing something and this is supposed to be the case now?

    Thanks!

    Jonathan

    http://wordpress.org/extend/plugins/cpt-onomies/

  2. Rachel Carden
    Member
    Plugin Author

    Posted 2 years ago #

    Hmm... so wp_insert_post() doesn't work but $cpt_onomy->wp_set_object_terms() does?

    Is wp_insert_post() being called because you're editing a post? Or because you're calling wp_insert_post() on your own?

  3. Jonathan Ogden
    Member
    Posted 2 years ago #

    Thanks for the quick response!

    I insert the post with wp_insert_post and then set the terms for the CPT-onomies using $cpt_onomy->wp_set_object_terms().

    I am calling both functions on my own - outside of WordPress.

    wp_post_meta is being updated - meta_key(s): _custom_post_type_onomies_ is/are correct and the post has the correct taxonomy and terms, but wp_term_relationships is not being updated which is affecting if a post is showing up in a loop that uses that information. However, two weeks ago, wp_term_relationships was being updated...

    It probably is something I'm doing and not an issue with CPT-onomies. But I wanted to make sure before I tear my hair out (difficult - I don't have much hair).

  4. Jonathan Ogden
    Member
    Posted 2 years ago #

    OK, I figured it out. There were remnants from old pre-CPT-onomies taxonomy experiments that were getting in the way.

    I had a sneaky feeling it was me and not CPT-onomies.

    Again, great job on a great script. A donation will be forthcoming! :)

  5. Rachel Carden
    Member
    Plugin Author

    Posted 2 years ago #

    Glad you figured it out!! Let me know if you have any more issues.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic