Categories
CMS Mastering Development Wordpress

Cannot view Custom Post Type no matter what I try

This is my code to register the post type: // Register new post type, User Conversations: b2bking_conversation add_action( ‘init’, array($this, ‘b2bking_register_post_type_conversation’), 0 ); function b2bking_register_post_type_conversation() { // Build labels and arguments $labels = array( ‘name’ => __( ‘Conversations’, ‘b2bking’ ), ‘singular_name’ => __( ‘Conversation’, ‘b2bking’ ), ‘all_items’ => __( ‘Conversations’, ‘b2bking’ ), ‘menu_name’ => _x( […]

Categories
CMS Mastering Development Wordpress

Invalid Menu Items

I registered a taxonomy named districts, but when I add districts to nav menus, the nav menu items are invalid! Here is the code that registers the taxonomy: function masallah() { // Add new taxonomy, make it hierarchical like categories //first do the translations part for GUI $labels = array( ‘name’ => _x( ‘Districts’, ‘taxonomy […]

Categories
CMS Mastering Development Wordpress

Invalid Menu Items [duplicate]

https://youtu.be/lME3lY-kNbA I told the question on youtube video also I tell the question here again: I cant add my taxonomies to menu except 000 taxonomy.I dont know why but it works: the error : invalid items… ( red showing as you can see on youtube video ) this one works: function deneme() { // Add […]

Categories
CMS Mastering Development Wordpress

Invalid Menu Items – The most interesting question

The question needs it so I captured the error.It is necessary so please watch it. https://youtu.be/lME3lY-kNbA if it doesnt open, please try this: https://www.youtube.com/watch?v=lME3lY-kNbA&feature=youtu.be I told the question on youtube video so I share only the code like what I said on video. I hear that video,video,video are you youtuber? no, it needed this […]

Categories
CMS Development Wordpress

Custom post type defaults to index.php for archive page

I’ve developed a custom theme with a custom post type named events. For some reason, however, WP refuses to use my archive page template with the file name archive-events.php per WP’s template hierarchy. WP keeps defaulting to index.php as the template for this post type. Previously I had a page configured in WP that was […]

Categories
CMS Development Wordpress

How do i enable categories for my custom post type?

I have a custom pos type created in functions.php and working great – except I need to have categories enabled. I have looked through other answers here, and am still not able to figure it out. In my code i have taxonomies => array(‘categories’, ‘tags’) but it is not working. Here is my code: function […]

Categories
CMS Development Wordpress

Adding a Gutenberg-like custom field on a custom post type

I’ve googled this a bunch, there’s a couple of answers for old versions (pre-gutenberg) of WordPress but none that I could find for Gutenberg. Essentially I have a custom post type I added by editing my functions.php like so: // Our custom post type function function create_posttype() { register_post_type( ‘Featured Sites’, // CPT Options array( […]

Categories
CMS Development Wordpress

How can I write slugs / permalinks as: custom post type -> custom taxonomy and custom post type -> custom taxonomy (one CPT and many taxo)?

This is my first post, so maybe I’ll miss some informations, sorry :bowing. I have almost the same issue as Paul T did (Permalinks: custom post type -> custom taxonomy -> post), namely : I have a custom post type called sioban_cpt, which have a custom taxonomy sioban_taxo. A sioban_cpt can have more than one […]

Categories
CMS Development Wordpress

Custom post type single page returning 404 error when sharing archive url with custom taxonomy

I am currently having an issue with my single custom post types returning a 404 error. The thing that is baffling me is that I have set this up exactly the same for another custom post type and it works perfectly. Although it was a good few hours of trial and error and searching forum […]

Categories
CMS Development Wordpress

Custom post type single page returns 404

Before posting I tried almost every suggestion from searching StackExchange and google. Overview: When I enter the permalink of a post it returns a 404. When I click on a link created by get_the_permalink(); I will see a 404 and this url structure ?post_type=lunchlearn&p=530 rather than /lunchlearn/burner-start-up-and-tech/ I’ve tried saving the permalink structure, flush_rewrite_rules, different […]