New answers tagged custom-taxonomy
0
votes
Accepted
Modify Term List in Custom Taxonomy Meta Box
For anyone who stumbles across this, I finally found the answer in this previous post:
How to modify the output of wp_terms_checklist when used within the built-in category metabox on edit posts?
I ...
0
votes
wp_add_object_terms cant recognize a post ID
Thank you @Ignazio.
I ended up with this one, and it works (for now) :
$post_object_id = wp_insert_post( $dates_insert_args, true );
$new_term_or_not = wp_create_term( $manifestation_insert_id, '...
- 25
0
votes
Have Custom Taxonomy Slug Fall Under Custom Post Type Slug
You can do that by writing a function using the 'generate_rewrite_rules' Wordpress hook. https://developer.wordpress.org/reference/hooks/generate_rewrite_rules/
<?php
function ...
- 1
1
vote
wp_add_object_terms cant recognize a post ID
With:
wp_add_object_terms( $cpt_dates_post_ID, intval($manifestation_insert_id), 'cpt_dates_postID');
You're actually saying "Add a cpt_dates_postID term with ID intval($manifestation_insert_id) ...
0
votes
WP Query - Can't get posts with specific taxonomy
WP_Query is not used in functions.php. While it could be used in certain circumstances, it is too easy to break main loop. In Theme developer manual you have it described how to do it, you typically ...
- 713
0
votes
WP Query - Can't get posts with specific taxonomy
It appears that you're attempting to add a function to the init action hook from within the function you're trying to add.
Your code is doing this:
function portalp_custom_taxonomies() {
// ...
...
- 11.1k
0
votes
Adding Taxonomies to Custom Post Type Without Displaying Blog Post Categories
Thanks to @Jacob Peattie for pointing me in the right direction. I was able to get the code to display exactly what I needed it to with the following syntax. My intent was to get an admin level ...
0
votes
How to display recent posts added in custom post types
You can use this code to get recent posts
$recent_posts = get_posts( array( 'posts_per_page' => 1, 'orderby' => 'post_date', 'order'=> 'DESC', 'post_type' => array('camp','cruise','...
0
votes
Accepted
Taxonomy entries are spawning copies of existing entries with the new title as the existing ID, since upgrade
I'll answer this myself, though kudos to @jacob-peattie for noticing the selection box was non-standard and a likely culprit.
So we had the 'Radio Buttons for Taxonomies' plugin running (up to date) ...
- 101
0
votes
cannot export data from CPT UI (books)
There is an option in CPT UI to enable export for the post type:
After setting this value on True you can export the posts including meta_fields (+ACF) on Tools > Export. For CPT UI this value is ...
- 101
Top 50 recent answers are included
Related Tags
custom-taxonomy × 4424custom-post-types × 2119
taxonomy × 663
terms × 616
wp-query × 384
categories × 287
permalinks × 281
url-rewriting × 214
custom-field × 207
php × 203
loop × 193
customization × 136
plugins × 117
tags × 113
rewrite-rules × 112
archives × 112
advanced-taxonomy-queries × 111
templates × 109
posts × 101
query × 97
plugin-development × 95
search × 95
functions × 94
custom-post-type-archives × 91
tax-query × 89