The simplest way is to create Page (maybe call it “All Codes”). Then, you “hijack” that page’s PHP template by creating a PHP file in your theme’s directory called page-all-codes.php
(note how the “all-codes” part corresponds to the slug of the Page you created).
You can then use WP_Query to get a list of your posts. Your arguments should look like this – feel free to add more to customize your list (like how you want them ordered etc)
$args = array(
'post_type' => 'code',
'posts_per_page' => -1
);
How you use these $args is up to you. The easiest (and in this case, probably not so bad) way is query_posts( $args );
.
Related Posts:
- How come Featured Image isn’t showing up in my Custom Post Type?
- How to use a custom post type archive as front page?
- Set posts of a custom post type to be private by default?
- clients list using wordpress
- expire wordpress user posts
- Forcing all posts associated with a custom post type to be private
- How can I add dropdown widget/box to admin post page?
- Detect meta value changes when post is updated (post_updated)
- Search everything (posts, pages, tags, cpt, meta)
- How to Removing fields from the Media Uploader/Gallery on a Custom Post Type Edit Page
- Best way to style first post differently?
- if && problems with transition_post_status
- custom post type upcoming post and past post
- Add multiple custom post types in functions.php, but only one custom post type show in dashboard
- Beginner question: Accessing functions.php through admin web interface in order to import custom post types?
- Display only custom post type count for current author on the “At a Glance” dashboard widget
- Post the content of a specific “Custom Post Type” post within a post using a shortcode
- Need functionality with all post list available at edit.php
- Remove default post types on all sites except primary blog. WPMU
- How would I create a shortcode to display a custom post within a page or regular post?
- Custom Post Types relationships
- How to retrieve category NAME instead of ID in a function with a taxonomy custom field?
- Filter categories of posts with checkboxes
- Copy custom field value to post title
- Insert HTML inside link in a walker
- WooCommerce product search titles only
- Remove standard meta boxes from custom taxonomy
- What’s the difference between same wp functions get_posts(); functions in different form?
- custom post type not showing in menu
- Show category ID on custom post type
- Custom Post Type with Templates using Meta Boxes?
- Can I list a custom post type within another custom post type in the admin area?
- Set URL link to featured image of custom post type
- Change CPT archive title
- AJAX load more for different custom post type loops
- On update or create post redirect to current post position in list
- Featured image overlay when changing post status
- create a new page from a custom post type similar to an authors page
- Cannot save CPT meta box
- next_/previous_post_link() `in_same_category` appears to fail when true
- Want to be able to sign up subscribers as authors
- categories should be available across all custom post types
- Warning: Invalid argument supplied for foreach() in post.php [closed]
- Post-thumbnail only for specific post-types?
- Custom Post Type & Custom Menu Walker to append custom class for active post types
- Enable taxonomies by post type in an array of CPTs
- custom post for slider
- Excerpt function for any content
- Navigate posts with different post type that are in the same categories
- Page Template Dropdown For Custom Post Types
- Show Custom Message in WordPress Admin
- How exclude or skip post type with get_next_post_link
- Prevent A Specific Custom Post Type Showing In WP Search Results Page
- providing access to post_id or post inside functions.php
- Is it possible to use array_walk() to append terms to an array of posts?
- WordPress notification if new post published
- Run shortcode in custom script in wp_head if post type is CPT ‘Jobs’
- Get post format
- post_content is stripping HTML when adding a new post? [closed]
- Shortcode to return single custom post based on post taxonomy
- Template code to split a post and print a custom field?
- Send post changes to set email addresses (not users or subscribers)
- Twitter Product Cards
- Function to limit number of custom post types on homepage – TwentyTen
- Foreach loop returning more than one item when querying taxonomy
- Post visibility option to theme front-end for author to select?
- Excerpt length: get first paragraph
- display custom portfolio tags
- Post type Echo code is repeating on homepage
- Submit Custom Postypes from frontend
- Need help with Custom Post Types and Taxonomies
- new post-type how do i retain the plugins on my sidebar?
- Custom Post Type Dashboard Tab not displaying any posts
- Title and URL Error in Breadcrumb Navigation for Custom Post Types
- How to add specific terms in a custom post type?
- Assigning categories to custom post types via a front-end form; only works for native post type
- Default excerpt for parent of a custom post type
- Limit custom post type to the authors only on front-end!
- Move to trash custom post type post after ACF Date Picker date is older than today
- From CPT Custom Loop into Shortcode?
- Load custom post type with ID in a shortcode
- How to assign post to category
- Using get_post_type with a custom URL format?
- If thumbnail image else post title
- $_SESSION Not working after X amount of page views
- Different Configuration for the_excerpt()
- WordPress page not showing up – replaced with last 10 posts?
- Custom permalink rewrite rules – how do I fix this?
- Post that populates itself (almost) automatically using data from imported excel file
- How to mark posts as visited
- Custom Field to post_title
- Post Custom & Taxonomy 404 error
- How To Display Category list from Portfolio post type plugin?
- Create 2-layered dropdown menus for custom taxonomy and custom post type
- can’t see categories in appearance-menu-categories
- send email to all registered users when post expires
- Allow authors to create article image
- I want to show a list of posts under specified categories
- I want to show a list of post with title that have link goes to that post and icon under the specific category to which it belongs
- Is it possible to use a post name in a custom post slug?