One of the parameter that you can pass to the supports
argument is post_formats
, removing this argument will fix the problem with the preview redirecting to a wrong or non-existing url.
Code sample:
if ( ! function_exists('custom_post_type') ) {
// Register Custom Post Type
function custom_post_type() {
// some code
$args = array(
// 'supports' => array( 'title', 'editor', 'author', 'thumbnail', 'revisions', 'post-formats', 'comments', 'sticky'),
'supports' => array( 'title', 'editor', 'author', 'thumbnail', 'revisions', 'comments', 'sticky'),
'taxonomies' => array( 'category', 'post_tag', 'your_cpt_pictures', 'your_cpt_updates', 'your_cpt_outline' ),
'capability_type' => 'post'
);
register_post_type( 'your_cpt', $args );
}
// Hook into the 'init' action
add_action( 'init', 'custom_post_type', 0 );
Related Posts:
- Matching Chapters to a Custom posts [closed]
- ACF: post query, hide duplicate values [closed]
- Redirect to another page using contact form 7? [closed]
- Using ACF default value to autoincrement a number field
- How do we update a custom file upload field with the Advanced Custom Field plugin?
- How to create repeater field manually, without plugin (ACF Pro)?
- Setting Author on CPT
- PHP Fatal error: Cannot redeclare distance() when making a new block
- Query Custom Post Types on Available Dates
- Is there a way to order posts and custom post types as one group?
- Get post by ASC from custome field DATE picker
- RW Meta Box ,Problem setting post title
- How does WP handle multiple matching rewrite rules?
- how do i remove posts from a WP_Query so the pagination is right?
- Saving Custom Post types and fields to a custom table
- dynamically generating plugin syntax
- Is it possible to use WordPress as an online portfolio for text content? What kind of theme would I look for?
- Building a store locator with google maps
- Duplicate posts when posting nulls in records in phpMyAdmin [closed]
- How to make wp_enqueue_style and wp_enqueue_script work only on custom post type
- Loco Translate: Custom Post and Custom Taxonomy Labels not translated in wp-admin menu
- Accessing post’s meta data based on user’s click of a post
- Getting value from Advanced Custom Fields [closed]
- How can you include a theme template file from within a plugin (i.e. WooCommerce’s Shop page)?
- Inserting HTML tag with ACF into shortcode
- Advanced Custom Fields plugin – get text from editor field and save it in a variable
- How to create user groups and allow custom posts and plugin modify/access to specific group?
- Correct way to make meta box with more than one meta field secure
- I want to extend the current themes’ single.php to display the meta fields of my CPT
- Plugin custom post type – Internal server Error
- Exclude post by custom meta with pre_get_posts
- How can I create a custom shortcode that will return a custom post type by ID?
- how to find and correct plugin query performance issues
- Is it possible to create Custom Post plug-in?
- get_post_type() and WP_QUERY issue
- Pull out Advanced Custom Fields in Related post plugin
- get_post_type on post.php
- List taxonomy terms for post as checkboxes
- All of my custom posttypes are 404’ing
- more types plugin – display all post of post type on page
- When using Simple Fields plugin, how do I pull the information out of the database to display on a page?
- How to make a proper custom post type link
- Using a post-signup hook to get user details
- Advanced Custom Fields displaying on tag pages
- Custom post type – no layout section of Document tab, and no author choice
- Creating a custom post type, adding custom meta fields, preventing all future editability of posts of this type
- ‘No Results Found’ on single post for custom post type
- Keep a post copy when this one is updated – issue
- Making a Template for a CPT created by a plugin
- how to add a button next to the wordpress view button?
- Custom Fields with Pods not being translated
- auto populate list of questions if user select a category xyz
- is there a way to link one of the field in ACF field group, to a field in a media attachment page? [closed]
- Problem In Advance search Plugin [closed]
- How to remove the inline styles from the content of a WYSIWYG editor field at the time of saving the post?
- add custom filters to the event calendar plugin programatically to frontend [closed]
- Can you use another Profile Builder shortcodes through advanced custom fields
- Mq translate plugin custom post type issue
- dirname( __FILE__) returning wrong directory inside plugin
- Unable to get WP_DEBUG, WP_DEBUG_DISPLAY, WP_DEBUG_LOG to work
- “Custom Post Type Permalinks” plugin URL strcuture
- Unable to delete custom post types, confusion around capabilities
- Adding CSS to custom post type admin page causes error
- Paid Membership Pro with ACF [closed]
- ACF only showing up in Homepage but doesn’t appears in all pages
- What is the best way for showing a grid of customer logos?
- Custom Post Type Fields
- How to delete all trashed item in one-go
- Advanced Custom Fields – Disable Users to Edit Custom Fields
- How can I use a file in my plugin as a replacement for single.php on custom-post-type query?
- Custom setup of wordpress comments that are displayed
- publish_post action doesn’t work
- Disable Individual Plugins (specifically in Custom Post Types) on a per-post basis?
- WordPress custom taxonomy not showing
- URLs Added to ACF Repeater Field are not working
- custom post type don’t appear in the home page
- Advanced Custom Fields – Get value in other plugin file [closed]
- Edit Permalink Structure For Custom Post Type or Modify .htaccess?
- Slashes stripped in ACF
- Remove Advanced Custom Fields plugin for client?
- Adding class to last list item? Not WP generated
- How to Resize the Custom Post Images?
- Amazon.com intergration with WordPress?
- Problem installing plugin: unexpected T_STRING, expecting T_FUNCTION
- How to set category correctly for a custom post created by a remote API call?
- Sticky option for custom post types without using custom fields or plugins
- Keeping and updating ACF and ACF Pro at the same time
- How to use template_include hook with form submission?
- Trying to add a page template for my custom post type from a plugin, but it will not display in the template dropdown unless file is in theme
- jet engine listing for every single taxonomy in post type [closed]
- How to export post tags from wordpress
- Sort posts by Date (DESC) and by ACF: active_inactive (ASC)
- Failed to update a post when I add a taxonomy to it
- How to access the page without registering in wordpress
- AI Code For OpenAI
- CPT template is not being automatically used single post pages
- How to make content as required in custom post type?
- Set the title of a custom post automatically by using info from custom fields?
- ACF prugin for WooCommerce Shop Page
- WordPress Throwing Deprecated Errors on its own Files