Sometime it happens, that at first we create custom post type, register taxonomy and insert some data for that custom post type. After moving forward, then we realise that, we need to change the slug for that custom post type. There might be some reason for this. Whatever the reason is, when we change the… Continue reading How to change custom post type slug without loosing data
Category: Custom Post Type
WordPress Query Basics
Show all posts from a custom post type WordPress has a small function get_posts() to do this job. You just need to set your arguments and pass that argument inside the function. It returns an array of latest posts. You can use foreach function to loop though the returned array. Show all posts for a… Continue reading WordPress Query Basics
How to create custom post type in WordPress
WordPress comes with some default post type. Those are reserved in WordPress. You can create your own post type. Creating a post type in WordPress is nothing but a simple block of code. You just need to define your post type name and some array or string of arguments to register custom post type.