The Guide to WordPress Custom Posts
WordPress has become a place for solid content management for past several years. It is all because of the creation of custom post mechanism as it allows to create lots of various types of content. This provides greater functionality and better ability to customize your site completely, so as to fit your goals and requirements.
What can WordPress do?
You have consumed a lot of time in selecting the best WordPress themes and developing a host of great content but now let the WordPress do some work for you. One of the best things, they have done is allowing for custom posts that allows for a different post type value. You are now able to get away from regular ones that are page, posts and attachment and can create your own so that the site knows what type of content you have developed. For instance, you can develop custom posts on the things like books, products, movies and reviews. You can also modify a multitude of options, like whether the post should be searchable, where it should be on menu, whether it should be hierarchical , the level needed by the user to access it etc. To work with this type of post, there are a few things that you need to know.
- creating custom post types
- creating custom taxonomies
- creating custom meta boxes
Creating custom post type: The first and the foremost thing to look at is how to actually create the post, When you are working with custom post types, it is important and beneficial to create a plugin. If you are not aware of doing this, then you can simply use functions.php in your theme. This will lead to a custom post that has not much customization, it will not be in admin and not be in public and the interaction messages will be the same. Most of the frequently used options are as follows:
- Public: This will affect the visibility of the custom post.
- Labels: This allows you to state the different labels that are allowed on custom post.
- Has archive: Rewrite the rules that are made for you when this is set to true.
- Description: This lets you to explain why you are using a custom post
- Supports: This sets up the default controls of WordPress on the edit screen for custom posts.
- Menu Position: This lay down the custom posts position in the back end.
Custom Meta boxes: When you are on the post edit screen in WordPress, there are draggable boxes that you see. You will find lots of these like publishing control, taxonomies, author box, and you can also create some of your own. These are used to manage the custom field data easily and are also more user friendly than the built in field boxes. There are three steps for Meta box creation, which are as follows:
- Define the content of Meta box
- Define the box itself
- Define the managing or handling of Meta box data.
Custom taxonomies: Tags & categories are used by regular blog posts, in order to create an organization structure. But when it comes to custom post types, then it makes sense. For instance, if you are working with the products then you can easily create the taxonomy for it, so that the different categories, that can be used exclusively for the products can be included here. It is easy to create the taxonomy, but tailoring it is a little more work. Add few more labels and set up the hierarchical option to true and in this way you can create a custom post type.
Summary: The things mentioned above acts a guide to create custom posts in WordPress.
I am Emma Alice working with SEO Rank Smart from last 4+ years. Want to share my view about Responsive Website Design importance for Mobile SEO Strategy nowadays.