Comments (8)
Hi, I think Category and Tag are just 2 predefined taxonomies and are used for posts. It would be a confusion if custom post type doesn't have categories or tags. The plugin now allows you to define custom taxonomies and assign them to post types (so the relation is taxonomy --> post type, not post type --> taxonomy) and it makes more sense.
from mb-custom-post-type.
The issue is that I want to use the 2 predefined taxonomies for my custom post types.
The predefined taxonomies cannot be attached to a custom post type created by this plugin at this time. I am trying to remedy that.
from mb-custom-post-type.
I got it. Will add that in the next version.
from mb-custom-post-type.
Thank you! Could you tell me when the next version will most-likely come out?
Thanks again,
from mb-custom-post-type.
New version was just released. Enjoy the plugin :)
from mb-custom-post-type.
Thank you for including the feature in the new release! However, you are having the same problem I had. A user has to select BOTH category AND tag in order for either to show in the custom post type.
This is because of line 89 in inc/post-type/register.php
$data = 1 == count( $value ) ? $value[0] : $value;
When you check only one of the check boxes either categories or tags, the count() of the array for taxonomies is 1 and $data becomes either 'category' or 'post_tag'. Then when the post type is registered on line 57, $args['taxonomies'] is not an array like it is expecting.
from mb-custom-post-type.
Here is some code to fix the issue.
Replace this:
$data = 1 == count( $value ) ? $value[0] : $value;
With this:
if ($key != 'args_taxonomies' )
$data = 1 == count( $value ) ? $value[0] : $value;
else
$data = $value;
from mb-custom-post-type.
Thanks for your help! I've just updated the code with the fix.
from mb-custom-post-type.
Related Issues (19)
- Add post updated messages for CPT HOT 1
- Access custom post type in WP REST API HOT 2
- Export PHP code HOT 2
- Unable to import custom post type and taxonomy HOT 1
- Menu position isn't working HOT 3
- Undefined index: post_types HOT 1
- Support rewrite options for taxonomies
- How do I make metaboxes "show up" under my desired CPT? HOT 1
- Undefined index 'meta_box_cb' in taxonomy/register.php HOT 3
- Flush rewrite rules HOT 1
- AngularJS should run when edit custom post type
- Separate labels and settings HOT 1
- Critical error on update to version 2.3.0 HOT 2
- Full code to register mb-post-type HOT 1
- The UI string "Search..." should be localized
- hide main post type 'mb-post-type' option HOT 1
- Handle rewrite correctly HOT 2
- Allow to set "Prepend Permalink Structure" for post type registration HOT 3
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 mb-custom-post-type.