Magento add shipping rates for weight based on zip code/postal code

Are you using magento store? You want to add shipping rates for the items based on the zip code/postal code ? Then you’re in the right place. Here I’m going to show how to add shipping rates based on user selected country.
I imagine you in your store, user will enter the zip code manually. Also you can auto populate the zip code after user selected the city in drop down box for your country.I’ll explain this method in my next post.
Let’s start.
Continue reading Magento add shipping rates for weight based on zip code/postal code

wordpress sort custom post type columns

When you’re creating custom post types into your wordpress site you can see it’s posts as list.But there is no option to sort each columns.You have to manually add this facility to do this.I’ll describe here very simply how to do this without any plugin.
Continue reading wordpress sort custom post type columns

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 create custom post types/taxonomies

Custom Post Types are a new set of administrative options appearing along with the default post types such as Posts, Pages, Attachments etc. A Custom Post Type can store any type of information. It has a editor, media uploader and uses the existing WordPress table structure for ease in data management.

By default, WordPress comes with 3 taxonomies:post tag, categories and link categories. Essentially, a taxonomy is a way of classifying data. Continue reading WordPress create custom post types/taxonomies

WordPress create custom meta boxes

This post is explaining creating wordpress custom meta boxes/meta data in easy,secure & proper way.A post meta box is a draggable box shown on the post adding/editing page. Its purpose is to allow the user to enter information in addition to the main post content.

There are two types of meta boxes. Continue reading WordPress create custom meta boxes