Sub Categories in drop down menu

You can use this function: the_widget( ‘WP_Widget_Categories’, ‘dropdown=1&hierarchical=1′ ); This function give you a select box and you will get all the parent categories and sub-categories. After applying this code inspect category select box, then you can manipulate your HTML code. And show your category as you wish. If you don’t want any select box, … Read more

Media Upload to custom database and Custom Directory

I suppose, you didn’t create table imageupload or can’t create folder if_images at your plugin folder. As a proposal I suggest you to use built-in WordPress functions and wordpress tables or create table on plugin activation. To create new table use function dbDelta. If you want to upload user files, use well-documented wp_handle_upload function. For … Read more

How to make a website with two types of logins , Sellers and buyers?

Use a single login, and tag each user as either a buyer or a seller using user meta e.g. lets use a user meta field called shireefs_login_tag To set the tag: update_user_meta( $user_id, ‘shireefs_login_tag’, ‘buyer’ ); To read the tag: get_user_meta( $user_id, ‘shireefs_login_tag’, true ); To redirect on login: function my_login_redirect( $redirect_to, $request, $user ) … Read more