How do i use my custom post type plugin in wordpress.

First you need to create a custom post type in your wordpress admin. so from left side menu click on menu Content construction.

Now yow will see the list of posts types here. two post type post and page will be there. this is system generated post type. post is the regular post that you use in wordpress post and page is wordpress pages.

After that you will see two forms, first form with two text fields and a button labeled “Create content type”. This is used to create new content types.

Second form with two blank fields and button labeled “create parent menu”. this is used to create menu in admin left menu bar. It will be useful for those users who have many content types and your left menu is going too down the scrollbar and you want to organisation all your content types in a sub menu of left menu.

If you only want to add more custom fields in your regular wordpress post type then click on manage fields button of post row.

If you only want to add more custom fields in your regular wordpress pages type then click on manage fields button of page row.

if you want create new custom post type then you need to fill machine name and label of custom content type. and then click the button create content type.

for example if you want create new custom post type news. then is machine name enter the name news and in content type label field enter name News.

after clicking on Create content type button you will see that your list has updated and new content types is now visible in the list.

Now click on manages fields button of new content type row. here you can add as many fields as you want of various types.

Grouping of fields it to group fields in admin section when you will enter the data. different different boxes will be displays for groups.


HOW TO USE IN THE FRONT SIDE

After creating new content type in your wordpress website. we need to check is it appearing in front side or not so create a test post in new content type.
access the url http://[your site]/?post_type=news

If you see the list of post displays on this url then congratulations your custom content type if ready to use.

Now you can copy you current theme file for single and list page.

Single post of a custom post type will use single-{post_type}.php ex. single-news.php

and their archives will use archive-{post_type}.php ex. archive-news.php
You can copy your archive.php to archive-news.php and changes its design as your need.

HOW DO I ACCESS MY CUSTOM FIELDS IN MY archive-news.php FILE.

You can use function in you theme file. if you dump the variable $data you will see that all variable with its values and images has come here and now you can use it in you theme file.

This a short detail of custom post type plugin. if you want my support for your wordpress website you can email me at nfaaiq@gmail.com. It is paid service.

Thanks

Leave a Reply

Your email address will not be published. Required fields are marked *

one × 4 =