functions – delete_term is not working properly with add_action()

Question
delete_term is not working, I'm trying to delete term and after I deleted it, it'll also delete the similar term from different a taxonomy based on their slugs here's my code of the delete_term, so in the code below, when
0
2 days 0 Answers 0 views

wp query – I need to get all categories from a WP_Query

Question
Actualy i'm doing this $loop = new WP_Query($args); while ($loop->have_posts()) :$ID = $postData->ID;$freeCategories = get_terms(array( 'taxonomy' => "product_cat", 'fields' => 'names', 'objec
0
1 week 0 Answers 0 views

Question
The function to set custom term works fine. add_action( 'save_post', 'set_custom_term', 30, 2 ); function set_custom_term( $post_id,$post ) { wp_set_object_terms($post_id, 'guitar', 'instrument',true); } I need to s 0 1 month 0 Answers 0 views terms – mysql to get related tags of a tag and order by intersection rate? Question What I try to do is create a wp plugin to get related tags of a tag and order by intersection rate. For example, in a WordPress site, data structure like below: 40 posts has tags B, 200 posts has tags C 0 2 months 0 Answers 0 views terms – How to get tags only with custom meta field and display them randomly? Question I'm trying to have a function to display only the tags with custom meta field tax_image_url_universal and display them randomly, which means when page reloads different tags to be displayed. Currently I have the following to display r 0 2 months 0 Answers 0 views terms – List posts grouped by children of a custom taxonomy Question I am successfully listing posts grouped by category from a custom taxonomy like so: Category 1 Category 2 Category 3 Category 4 I am trying to only list groups of categories (with their posts) that are descendants of pa 0 3 months 0 Answers 0 views terms – Trim output from the the_terms function Question I need to trim the first 5 characters (the same across all the terms to be displayed) of a listing of terms. This is my code: <?php ltrim(the_terms($post->ID, 'atsc_progress_reports_post_type', '', ', ' ), "2022 "); ?>
0
4 months 0 Answers 0 views

wp query – Get access to all terms associated to each post that the wp_query loop displays

Question
If the following loop logic gives me access to post properties that are associated to a CPT (for example, 'sports')... \$args = array( 'post_type' => 'sports', 'posts_per_page' =&
0
5 months 0 Answers 0 views

terms – get_terms_args ordering by meta key not working

Question
I have a custom taxonomy called "edition". Each edition has a meta key "_edition" that stores an incremental number from 1 to N. So, if I have an edition called "Edition 13", it will store "_edition" meta key with value of 13. My question is: I'm
0
6 months 0 Answers 0 views