Contents
How to create a custom post type page?
The following works for me (I’ve removed all the formating / custom post meta). I would add, its not clear why you need to use a page with a custom template, and don’t instead create a template called archive-portfolio.php which is used for a custom post type’s archive pages (see template hierarchy)
What’s the difference between a post and a page?
A post type is a type of post (in the broader sense) that a given item of content belongs to. And a “post” is a post type, as is “page”, “attachment” or any custom post type you register (I know, it’s confusing but I’ll dig deeper in a minute).
How to add custom column in posts and custom post types Admin screen?
The default.jpg image must be present in the images directory of our active theme. You can also show / hide this new column by opening the Screen Options panel and clicking the Featured Image checkbox: One of the most interesting and useful features of WordPress, is the possibility to add Custom Post Types (and also Custom Taxonomies).
Why are custom post types important in WordPress?
WordPress custom post types are powerful features. They’re what elevates WordPress from a humble blogging tool to a content management system, and give you the all-important flexibility you need to create a bespoke website. But they can cause confusion: what are WordPress custom post types exactly?
When to use single post or archive post template?
The single post template used when a visitor requests a single post from a custom post type. For example, single-acme_product.php would be used for displaying single posts from a custom post type named acme_product. The archive post type template is used when visitors request a custom post type archive.
How to include pagination in WordPress custom post type query stack?
I am trying to use paginate_links WordPress function but no matter where I put it, I can’t make it work. Can someone help me with this?