JoomShaper Affiliate

JoomShaper's Blog

Exclusive Joomla tutorials, tips and tricks...

30 May
3187
Posted by in Wordpress

My last tutorial was Create Custom Post Type in WordPress. Before read this tutorial please take a view in past article. Today we will discuss some advanced features in WordPress Custom Post Type. Personally i lke Custom Post Type very much. It is very handy and most powerful feature comes with WordPress.

Why Use Custom Meta Fields?

Custom fields allows you to make your WordPress backend customizable and managable easily. Example, you want to create a Portfolio Section for your own collection of works. It may be include fields like- Portfolio Title, Description, Website URL, Thumbnail Image etc. You cann't get all the fields you need, built in with WordPress. 

GET STARTED!!!

To create custom meta boxes, you have to learn about action hooks, that create a meta box and save it in the 'prefix_postmeta" table in Database.

Register Meta Box with action hook in your functions.php page in the theme folder.

{codecitation style="brush: php;"}

...
16 May
18.856K
Posted by in Wordpress

The beauty of wordpress that you can customize your site as you want. You can create custom posts of your blog or website. Extending the feauters of WordPress you can easily create a site like Youtube, BBC. There are five post types built in WordPress. Custom Post Types are-

 

  1. Post
  2. Page 
  3. Attachment
  4. Revision and 
  5. Navigation

To create a custom Post Type, you have to create some functions in your theme fuctions.php or you can create a new Plugin file. Open your theme functions.php with your suitable Editor. I am using Sublime Text 2. For example you want to create a Portfolio section in your website.

It's up to you that you want to create the Portfolio section as post or page type. It's called "capability_type".

Register a function

...
Scroll to Top