Comments (4)
Can you post your complete post type and taxonomy registration code?
from extended-cpts.
$labels = array(
'name' => __('Artwork'),
'singular_name' => __('Artwork'),
'add_new' => __('Add New'),
'add_new_item' => __('Add New Artwork'),
'edit' => __( 'Edit' ),
'edit_item' => __('Edit Artwork'),
'new_item' => __('New Artwork'),
'all_items' => __('All Artworks'),
'view_item' => __('View Artwork'),
'search_items' => __('Search Artwork'),
'not_found' => __('No Artworks found'),
'not_found_in_trash' => __('No Artworks found in the Trash'),
'parent_item_colon' => '',
'menu_name' => __('Artworks')
);
$args = array(
'labels' => $labels,
'description' => __( 'Artworks collection' ),
'hierarchical' => false,
'supports' => array('title', 'thumbnail', 'editor', 'page-attributes'),
'rewrite' => array('slug' => __('artwork'), 'with_front' => true),
'public' => true,
'publicly_queryable' => true,
'exclude_from_search' => false,
'show_ui' => true,
'show_in_menu' => true,
'show_in_nav_menus' => false,
'show_in_feed' => true,
//'menu_position' => 20,
'query_var' => true,
'has_archive' => false,
'can_export' => true,
'capability_type' => 'page',
'menu_icon' => 'dashicons-format-image',
'admin_cols' => array (
'featured_image' => [
'title' => __('Image'),
'featured_image' => 'thumbnail'
],
'date' => [
'title_icon' => 'dashicons-calendar-alt',
'date_format' => 'd/m/Y'
],
'artwork_category' => [
'title' => __('Category'),
'taxonomy' => 'artwork_category',
],
'menu_order' => [
'title' => __('Position'),
'post_field'=>'menu_order',
],
),
'admin_filters' => array(
'artwork_category' => [
'title' => __('Category'),
'taxonomy' => 'artwork_category',
],
),
);
register_extended_post_type ('artwork', $args);
from extended-cpts.
I think that the issue is related why the get_taxonomy (https://developer.wordpress.org/reference/functions/get_taxonomy/) method don't return any value in the "query_var" attribute.
Then the "wp_dropdown_categories ( .." call (https://developer.wordpress.org/reference/functions/wp_dropdown_categories/) in PostTypeAdmin class, line 307 don't have any value in the name attribute.
from extended-cpts.
Ok, identified the issue. The param "query_var" when is declared in register_extended_taxonomy must be set to true.
from extended-cpts.
Related Issues (20)
- Problem with use meta in WP_QUERY HOT 2
- Plugin is incompatible with Composer 2 HOT 1
- Consider using a different method to check a date/time type value HOT 2
- Taxonomy admin cols meta_key date_format HOT 1
- Shared post_tag between CPT's and admin fillter tag=0 issue?
- Fatal Error after migrating from production to staging environment HOT 3
- Will this eventually be useable in a plugin? HOT 1
- Admin Filter, not filling in select value with array key HOT 1
- wp-browser composer patch is no longer valid when running `composer install`
- String value for "has_archive" not respected HOT 1
- Avoid fatal errors on dashboard HOT 3
- ACF date field not formatting correctly in admin column HOT 8
- Sorting not working on single tem page HOT 1
- Setting 'meta_box' => 'radio' causes unusual behaviour
- Register fields with WP GraphQL HOT 2
- Conflict with Permitpress Pro, proposed solution HOT 1
- Package License "GPL-2.0+" is a deprecated HOT 1
- WordPress 6.3 support
- should Admin columns work in a default post type like page? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from extended-cpts.