You register a post type named “latest news”, but you seem to already know that, so I am unsure what the question is. Do you want someone to copy and paste from the Codex for you, and change a couple of text strings?
function codex_custom_init_v2() {
$args = array( 'public' => true, 'label' => 'Latest News' );
register_post_type( 'latest-news', $args );
}
add_action( 'init', 'codex_custom_init_v2' );
You can then customize the post type archive by creating an archive-{post_type}.php
file and customize the single post display by creating a single-{post_type}.php
file.
Related Posts:
- Is it possible to define a template for a custom post type within a plugin independent of the active theme?
- Creating a default Custom Post Template that a Theme can override
- Template for custom post type shows all posts instead of just one
- Get image URL from media library in input
- How can I use a file in my plugin as a replacement for single.php on custom-post-type query?
- How to provide page_template path in custom plugin using WordPress
- Include theme header and footer in custom plugin
- Load a custom post type template.html from a plugin
- Tips for using WordPress as a CMS? [closed]
- Adding a Taxonomy Filter to Admin List for a Custom Post Type?
- Create custom page templates with plugins?
- Custom Post Type Templates from Plugin Folder?
- Implementing a CrunchBase.com Clone using WordPress?
- Pass PHP variable to javascript
- Custom media upload content for inserting custom post shortcode
- Redesigning Custom Post Type “Add New” page
- How to Remove Certain Screen Options and Meta Boxes from add/edit post type?
- Consuming an external API in WordPress?
- Is there a WordPress plugin that registers a plugin file as a custom page template?
- How to share category taxonomy with custom post type (The Event Calendar plugin)
- Is it possible to stop selected plugins from loading on certain template pages?
- How to get a variable number of posts per post type on the main loop?
- Ways to have multiple front-page.php templates that can be swapped out?
- How to add custom content template part for a custom post type on main query using a plugin
- WP_query parameters for date range
- Use a plugin to handle custom post types?
- How can I have two different urls for the same page that load two different templates?
- Page Templates from plugin not working after upgrading WP to 4.7 or upper version
- How Do I Use The WordPress Plugin Posts 2 Posts by Scribu?
- Custom Taxonomy in plugin and template
- WooCommerce – Load Templates From Plugin For All Template Files
- Jetpack plugin (ShareDaddy): Prevent share buttons showing on custom post types?
- Getting Custom Post Type content from main-site of a Multisite
- Custom database or Custom Post Types?
- How can I add a custom header to a custom template in a plugin without using the theme folders
- How to make a list of companies’ information and display them to user, using custom post types and a custom taxonomy?
- Custom comment type maybe?
- Register Custom Post Type from Plugin
- Prevent page slug from interfering with custom post type archive permalink?
- Add .html extension to custom post type taxonomies
- How to load a new template page according to a particular URL?
- Twillio How To Send SMS for Custom Post Type
- Use touch_time() on front-end form via plugin
- How to get the custom page get_permalink?
- Updating post meta for custom post types
- Seriously stuck with some custom meta box/plugin stuff
- how to redirect to my template
- Themes VS Plugins [duplicate]
- Template plugin for blog posts? [closed]
- Custom url structure for custom template
- remove custom taxonomy metabox form custom post type
- Enable comments for post with comments meta box removed
- [Plugin: Posts 2 Posts] reciprocal connections
- Custom Post Type Statuses
- How to Build a Movie Library in WordPress 3.x
- Custom Post Type causes Page Not Found
- Developer plugin to echo template names/filepaths [closed]
- How do I get multiple pages by title?
- How do I add a template to a theme using a plugin?
- Creating a wordpress plugin where users can override templates
- How do I make a wordpress plugin with menu item etc
- add_meta_box Callback not being called
- do_shortcode() doesn’t work if shortcode contained in variable, works if shortcode passed as string
- I need to add a custom “cover” to every new post — plugin or custom setup?
- Star rating for custom post types [closed]
- How to Make a Custom Grid View
- Plugin “Meta Box”: Implementing meta boxes in custom post type
- Way to hook into a sidebar call to replace it with a custom sidebar
- taxonomy_template filter do not loads custom taxonomy template properly
- Frontend editing, Frontend user dashboard
- Plugin allowing for artists, events and venues
- Disable Other Plugins on my Custom Post Type?
- How to get images from EDD post?
- Plugin shortcode won’t work on a custom template file [closed]
- custom taxonomy and custom post type url conflict
- Override comments.php template with plugin
- How to enqueue a theme style-sheet to my admin settings page?
- wordpress reusable content blocks
- Override plugin with functions.php
- Should i delete the posts created by a plugin on uninstall?
- Allow users mark posts as “complete”?
- How to Include a Loop Template File in a Plugin
- Woocommerce email template customization [closed]
- How to get the HTML until ?
- More than one text-domain is being used because of the included templates for plugins
- Is there a way to order posts and custom post types as one group?
- 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
- Can we use a webservice with WordPress?
- 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
- Should I fetch the data managed by a plugin by using its APIs or WordPress APIs?
- WP Post Template – Templates in own folder