public
is false
by default, your post type will not be visible on the front end without explicitly setting it to true
.
$post_args = array(
'public' => true,
'label' => _('Blog Post'),
'description' => _('Site\'s blog posts'),
'show_ui' => true,
'show_in_nav_menus' => true,
'taxonomies' => array('blog_posts'),
'supports' => array('title', 'editor', 'comments', 'trackbacks', 'thumbnail'),
'capability_type' => 'post',
'rewrite' => array('slug' => 'blog', 'has_archive' => 'blog_posts', 'with_front' => false)
);
Related Posts:
- I am trying to output portfolio items with a picture. This code doesn’t seem to be working. What am I doing wrong?
- Migrating a taxonomy’s tags to the native category
- How can I produce multiple webpages with a different output based on one entry/Page/custom Page?
- single-{$post_type}-{slug}.php for custom post types
- How to pass URL parameters for advanced taxonomy queries with multiple terms for one custom taxonomy
- tag.php doesn’t work with tags on a custom post type post?
- Assign single template to multiple custom post types?
- Add Content to Page without shortcodes
- Multiple Single Post templates
- Custom taxonomy query for a custom post type
- Why is get_post_format() for “Standard” returns empty
- How to list/show all custom post types regardless of category?
- Password-protect a custom rss feed
- Need some templating advice for templating with custom post types and taxonomies
- How to override parent theme function through the child theme [closed]
- Template tags to display custom post type posts in category template?
- How do I create new content pages for my Custom Post Type?
- custom post type archive template per custom taxonomy term
- Single Page WordPress CSS and JS links
- Display posts of child category in template
- custom taxonomy – Template not working
- Create separate template for shared custom taxonomy with shared terms
- Custom Post Type Templates?
- Custom Post Type .current-menu-item not applying on Custom Post Type Archive Page
- wordpress 3.4 template files in subdirectories
- Lock post meta block at the bottom of a custom post type
- How do I provide a “show all posts” link in a paginated term archive?
- Help with CPT template pagination
- How can I force custom post type to use a specific template?
- Merge multiple custom post types in a single archive template
- Trying to edit the single page from a Custom Post
- Pre_get_posts filter overwrites all search functionality
- Plugin templates in which directory
- Using wordpress template tags within an array
- Include custom post type single template, but respect theme override of template if it exists
- Custom post type not using custom template
- Custom Post Type template stored in plugin folder not showing in post attributes dropdown
- How to clone the “Projects” Custom Post type in Divi theme
- Create template for taxonomy results limited by Custom Post Type
- Getting template_include to work when allow_url_include is off?
- 2 Templates 1 custom post type according url
- How to use custom template files in deeper directory?
- How can I get this request to use the Custom Post Type page template instead?
- Unable to set featured image
- Custom posts template page
- How can I use archive-{post_type}.php theme template?
- Add Previous/Next Buttons to CPT Single Pages Only
- Custom post types problem
- How do I assign a block template (.html) to a custom post type?
- Templates for hierarchical custom post type
- Custom Post Type setup
- Apply template by path/slug related to custom post type?
- How to get the current category with custom posts
- Create a simple Testimonial page
- Assign a template to a custom post type when displayed by the main loop on the home page
- One Site. One Theme. Multiple Stylesheets without plugins?
- Custom Post Type – Portfolio no longer works
- How to create a archive template for custom post type [duplicate]
- WP not recognizing custom post type / template
- Custom post type draft use wrong template
- Create a custom taxonomy template that loops through child categories in term order?
- My template won’t apply, theme still fallback to index.php
- One Custom Post Type two different Templates
- Conflict in function to allow single post template based on category
- How to make post templates to include shortcodes only?
- On click some element i want to use some template
- Invalid content when I try to import custom post type from the old template wordpress
- Post template with breadcrumb needs to show page navigated from
- Accessing download link from the loop with WP Download Manager Pro
- Turning archive templates to a page template maintaining the slug
- get_permalink() of page the enclosing page not posts
- How to override post-new.php with custom template
- WordPress Custom Post Type – Post Attribute: Template. Template shows up and saves on the back end, but the default theme file is being rendered
- How to Create a Default Fixed Custom Posts layout for text and images
- Why did permalinks setting affect the pages?
- How to make a custom search template for custom taxonomy?
- Change Background Color For CPT Template
- Custom post type with two templates
- WordPress add taxonomies/terms list as a menu in archive page
- Custom Post Type tag taxonomy “Page Not Found”
- Adding CPT changes entire layout of my site except for the archive of that CPT
- DIVs not showing correctly on CPT?
- Why isn’t my custom post type using the corresponding custom post template?
- Query custom post type and showing its content
- Load different template for CPT (in loop) in my plugin?
- Search page for custom post type
- Problems with a custom meta_box
- Custom Post Type Template based on Taxonomy
- Template with Custom Post Type (Custom Tables) does not work
- Query by post type or category
- Change position of Post Formats box?
- Specifying Default Template for Hierarchal Custom Post Type [duplicate]
- Most appropriate way to display CPT’s by children terms of custom taxonomies while retaining desired permalink structure?
- how to pass args for archive.php query?
- Navigation links to posts in current term shortcode
- How to make a template for a specific post of a custom post type?
- CPT Template Option to Top
- Show my custom post id if a country or ip
- How to create custom page templates with default page layout framework?
- REQUIRED: The theme uses the register_post_type() function, which is plugin-territory