Rachel Cherry
Forum Replies Created
-
Forum: Plugins
In reply to: [Lock Your Updates Plugins/Themes Manager] Future ReleaseI’ve added your request and released version 1.1. Thanks!
Well, get_taxonomies() is only going to print taxonomies that are currently “registered”, i.e. the register_taxonomy() function is currently being run within existing code. It will not show taxonomies that used to be registered and still have term information in the database.
Run the following code and compare the list:
global $wpdb; $stored_taxonomies = $wpdb->get_col( "SELECT taxonomy FROM {$wpdb->term_taxonomy} GROUP BY taxonomy ORDER BY taxonomy ASC" ); echo "<pre>"; print_r( $stored_taxonomies ); echo "</pre>";
Without knowing the extent of how screwed up your taxonomy is, I can’t really make a suggestion. If it were me, I’d go into the database and remove them manually but if you’re not comfortable with that, then I wouldn’t do it.
If you want to change the name of your custom post type/CPT-onomy, you can use the following code to make sure the name is updated in the database, and obviously set the
$new_name
to your new name.global $wpdb; $old_name = 'sender'; $new_name = 'newname'; $wpdb->update( $wpdb->posts, array( 'post_type' => $new_name, ), array( 'post_type' => $old_name ), array( '%s' ), array( '%s' ) );
What’s the name of your taxonomy and custom post type/CPT-onomy?
The changes I made to the plugin should’ve detected your terms, though. Hmm.
It looks like you have some conflicting taxonomy terms. Did you ever have a plain taxonomy with the same name? It looks like that taxonomy still has some terms in the database and it’s confusing the query.
I wrote up some (hopefully) helpful tips for dealing with this: https://wpdreamer.com/plugins/cpt-onomies/documentation/incorrect-query-results/
Can you setup the following code in your functions file and tell me what it says?
I added
is_user_logged_in_()
logic so it only shows up if youre logged in, in case this is a live site. Of course, if this is a membership site, or something like that, you might need to change that.You can also change
is_category()
tois_category( 'Category ID, title or slug' )
to make the logic more category speficic.Thanks!
add_action( 'wp', 'my_website_get_query_request' ); function my_website_get_query_request() { global $wp_query; if ( ! is_user_logged_in() ) return; if ( is_category() ) { echo "<pre>"; print_r( $wp_query->request ); echo "</pre>"; } }
Great! Thanks!
Hmm. Is there any way you can get me the query that’s being run? If you don’t know how, let me know and I’ll send some ideas. It would be really helpful.
Hi! You’re not the only one seeing some issues on this front. We’ve been talking about it a lot over at https://www.ads-software.com/support/topic/133-broke-categories-on-my-site?replies=17.
I’ve made some tweaks to the plugin though to try and get this sorted. Would you mind downloading the development version and let me know if it fixes it for you?
Thanks!
Hi! I’ve taken care of your request and will be pushing out the update ASAP!
If you’d like to check it out in the meantime, you can download the development version.
Thanks!
I’ve made some changes and they’re in the development version. Can anyone test these out for me?
Once you’ve updated to the development version, be sure to check out your settings page to see if you get the message “Yes, but there might be a terms conflict.” in your “Registered CPT-onomy column.
Thanks!
I apologize that I haven’t had time to figure this out. I’m off work all next week so it will happen soon.
Did you upgrade and that’s why they stopped working? Or you upgraded a while ago and they randomly stopped working?
Have you tried flushing your rewrite rules to get your post types to show up? Settings -> Permalinks -> Save Changes.
Wow! Thanks! This will be so helpful.
Thanks for the info! I’ll be able to check it out in the next day or two!