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
- Load a custom post type template.html from a plugin
- Adding a Taxonomy Filter to Admin List for a Custom Post Type?
- Implementing a CrunchBase.com Clone using WordPress?
- Custom media upload content for inserting custom post shortcode
- 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)
- 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
- Custom Taxonomy in plugin and template
- Register Custom Post Type from Plugin
- Use touch_time() on front-end form via plugin
- How to get the custom page get_permalink?
- Updating post meta for custom post types
- how to redirect to my template
- How do I add a template to a theme using a plugin?
- Creating a wordpress plugin where users can override templates
- Frontend editing, Frontend user dashboard
- How to enqueue a theme style-sheet to my admin settings page?
- Override plugin with functions.php
- Should i delete the posts created by a plugin on uninstall?
- How to Include a Loop Template File in a Plugin
- How to get the HTML until ?
- How does WP handle multiple matching rewrite rules?
- Is it possible to use WordPress as an online portfolio for text content? What kind of theme would I look for?
- How to make wp_enqueue_style and wp_enqueue_script work only on custom post type
- Should I fetch the data managed by a plugin by using its APIs or WordPress APIs?
- 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
- 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?
- Plugin-generated pages use Not Found or Pages Archive templates?
- auto populate list of questions if user select a category xyz
- How to display (plugin?) output on a single page (not a widget, probably not a short code) – template, plugin, combination?
- Facebook Messager Plugin
- Advanced Custom Field DatePicker [closed]
- Perform internal redirect in WordPress?
- How WordPress is able to change locale without using setlocale
- Adding CSS to custom post type admin page causes error
- Redirect to another page using contact form 7? [closed]
- changing posts layout in ultimate member profile plugin
- Custom setup of wordpress comments that are displayed
- Where to find the code used to render a page that has a shortcode and a template defined?
- Sticky option for custom post types without using custom fields or plugins
- Plugin Admin Menu Boiler Plate
- How to use template inside plugin shortcode with variables for big HTML code
- Preview with Custom Post Type Not Working
- 2 wordpress site same database
- How to Include Custom Post Content From Plugin
- What hook can I use to modify custom post data before it is displayed on the page?
- reCAPTCHA on page template without plugin
- Custom Post Type template for homepage
- Pull comments from one page/post into another page/post?
- Best method of implementing compartmentalized custom post types on a multi-site network
- How to search post titles with whole words only, but not the exact word only?
- Remove custom taxonomy name from the slug – Custom Post Type UI
- Register PODS Custom Field with WPGraphQL [closed]
- Adding custom post category to categories widget
- Custom Post Type with Sequence ID
- How to arrange custom posts in the backend/admin by custom taxonomy
- Adding LOAD MORE on a page
- How to check if short code is present in template?
- custom post type get_posts() function not work
- Create multiple posts when a custom post is created
- Cannot view Custom Post Type no matter what I try
- Change Jobs for WordPress templates
- how to do Thematic like this website using wordpress?
- Customize plugin templates
- Template conflict with WC Payment Method
- How to add HTML to a template only when user is logged out/ not registered
- Adding a custom page template to a plugin generated page
- History of page, interval of years
- How to add dynamic content to posts page, archive, taxonomies, search, author, etc?
- custom template only for content
- Convert HTML5/CSS3 site to WordPress Theme (need a lot of plugins) or just use the API?
- Is there any simple wordpress search template that works with existing searchforms?
- Custom Post type plugin breaking the front page shows dashboard?
- How can i do custom author list?
- How to list the categories by custom taxonomy created?
- Looking for a plugins for organization portal (Staff, Units, Departments)? [closed]
- Display HTML5 jQuery Audio Player On Front Page
- Is there a plugin or another way that can help me find out the underlying files of a page/post? [closed]
- Wrong block appender button showing
- Select posts from list and add them in a new list
- jet engine listing for every single taxonomy in post type [closed]
- Failed to update a post when I add a taxonomy to it
- Newspaper theme, custom query vars, & custom rewrite rules
- How to add CPT in Elementor pro search template
- PHP Fatal error: Cannot redeclare distance() when making a new block
- Is there potential plugin incompatibility if theme has no header.php and footer.php?