WordPress create custom post types with tags and categories

If you’re working with wordpress sometimes you want to add custom post types with it’s tags and categories to add into admin panel.For a example, “News” custom post type.You can follow this tutorial guide to add unique custom post types with it’s tags and categories to admin panel.No errors,no tags and categories mixing with other post types.No usages of plugins.

Features

  • Unlimited Custom post types
  • No mixing with other post types
  • Creating unique tags and categories
  • No usages of plugins
  • Simple and efficient code
  • Customize display columns
  • Custom admin menu icon
  • Sort column by post name
  • Filter posts by categories

Now we’ll see how to add custom post type to wp admin panel.
-First you must go to the theme folder and open the functions.php file.If you’re using premium themes you can use custom-functions.php or theme-function.php.
-After that at the end of the file put the following piece of code.Here I’m using “News” custom post type.

 

Step-1

After add the above code you can see the changes as following.

custom post types

Further note:
If you want to add custom menu icon go to following link and select the icon.Then copy it’s name(Ex:-dashicons-format-aside) and put here.
Dashicons

Step-2

Main part is finished.Now we’ll add it’s categories.Note here,I’ll explain little bit mistake many user’s doing.
If you add following mentioned code, you can see categories mixing with other post type’s,default post’s categories.So DON’T USE Following code. ‘taxonomies’ => array(‘category’) ,// mixing with others.

This is the correct code.

 

Step-3

Now we have to do the customize columns as the following diagram.
custom post types columns

Add the following code to functions.php file.

 

Step-4

Filter news and sort by name.
To do that add this code.

 

Step-5

Adding Tags to Custom post type. You can add following code to add tags to News post types.No mixing with other post types.

Now you have implemented all codes and after that you can see custom post types with tags and categories,sorting,filtering functions.
custom post types all

Error fixing

May be when you visited to the category page you may not be seen the post related to that category. To fix this add the following code to function.php file.

Additional Notes

If you want to add more admin menu icons then add this code to functions.php file.

Follow my another post describing this.

Download full source code

wordpress publish a post from frontend without plugin

How to publish a post from frontend without plugin in wordpress? This is not a complex task and users can publish their own post without using a plugin.Post fields validations, error displaying and bootstrap html contents added and you have only add bootstrap css files.
Continue reading wordpress publish a post from frontend without plugin

WordPress Add Media Button not working

When you’re working with wordpress may be you have to face to this problem.This is a common issue in WordPress 3.5 version.When you going to create a new post or edit a post and if you click on “Add Media” button it is not working and nothing happened. If you updated wordpress this issue may be exist.The main reason is javascript/jquery conflicting.May be the Visual editor not working because of this issue.So I’m going to show how to fix this issue in few methods.

wordpress add-media-button-not-working
Continue reading WordPress Add Media Button not working

wordpress widgets are not clickable

If you have wordpress blog sometime you faced to this error. All wordpress widgets are displaying properly.After clicked on the each widget’s options are not opening.Another issue is widgets are not displaying.Menu items are not displaying when mouse hover.And other error is can’t drag and drop wordpress widgets. So in this post is describing how to solve these issues.

There are the errors in the admin panel.

  • After clicked on the each widget’s options are not opening.
  • Can’t drag and drop widgets.
  • Menu items are not displaying when mouse hover.
  • Sometimes not saving data.

The reason is javascript/jquery conflicting.

How to fix these issues?

There are some methods to fix these issues.

Method-1

Disable all plugins and check it.If not success sign out again.If success, the reason is plugins conflicting.Enable one by one and detect the plugin and try to update it.

Method-2

If you installed cache plugins clear all cache with admin panel.If you minified javascript, disable and check with reloading page.

Method-3

Apply twenty twelve or twenty eleven theme and check.If success, the reason is in your current theme.Try to update or find the solutions.

Method-4

If you are not install firebug add-on, immediately install to the browser and press F12 key, click Console button and check if displaying javascript or some errors.
If displaying you can identify what the errors.

Method-5

Check the jquery library file is loaded into the admin panel.If not exist, add it.
Better way is add “Use Google Libraries” Plugin.Then lot of issues are fixing.
Download Use Google Libraries from here.

Method-6

1-Go to the root folder and open wp-config.php file.
2-Copy and paste the following script end of the file and save it.

3-Check the admin panel for issues.

Hope this will be help to solve these issues!

WordPress Woothemes and Yoast SEO plugin getting double Titles

Woothemes also comes with some basic SEO settings with in.Yoast makes a great plugin called WordPress SEO. Unfortunately they don’t always play nice even if you don’t use the Woothemes SEO functionality.

Woothemes and Yoast SEO displying double title separators.I’ve been having a problem with my titles showing double title separators.
You can understand this by following image.

Woothemes and Yoast SEO plugin getting double Titles
Continue reading WordPress Woothemes and Yoast SEO plugin getting double Titles