Remove Featured image meta box from WordPress Admin
In WordPress, the remove_meta_box is used to remove metabox from post, page, link or any custom page form in admin section. However, remove_meta_box function doesn’t work for featured image box (postimagediv). After digging the core function, found a solution here. I just wanted to remove the ‘postimagediv’ meta box from the post edit form for […]
Login to WordPress Admin Using Php cURL

You might have a WordPress site which generates a file/information daily and you want to grab it without logging to your site. It can be done using cURL. So you don’t have to loggin and view the page anymore. Just use this script on your local server and run the script. It will get you […]
Schedule Additional Cron Job with cron_schedules WordPress hook
For Cron job, WordPress have three schedule time hourly, twicedaily and daily to add your event. All of them run on defined interval. Hourly runs in every hour, twicedaily runs in each 12 hours and daily runs in every 24 hours. To add a new schedule time, cron_schedules() filter is used. Below code will add […]
W4 Post List Examples
All of the lists shown below are created with W4 Post List plugin. Template created with shortcodes, HTML and CSS. Examples 1: Posts List List of posts. Showing post title, post date and post categories. Pagination is used with ajax call. Examples 2: Photos Grid List of images. Pagination is used with ajax call. Examples […]
WordPress Gallery Plugins
Gallery is where we visualize our site in short-way. Most the site use a image slider or gallery to attract their visitor and put a great impact on your site. Developer has created gallery plugins for your wordpress site. Here listed fews of them… NextGEN Gallery Plugin NextGEN Gallery is a full integrated Image Gallery […]
JavaScript Regular Expression
JavaScript Regular Expressions are quite same as PHP Regular Expressions. Syntax var check = /pattern/modifiers; pattern specifies the pattern of an expression modifiers specify if a search should be global, case-sensitive, etc. Modifiers Modifiers are used to perform case-insensitive and global searches: Modifier Description i Perform case-insensitive matching g Perform a global match (find all […]
Display Users login time on WP Admin Users Table

Using the wp_login hook, we could save an users login time. One usage of saving login time would be, to check who were recently logged-in to the site. wp_login action is called when a user successfully authenticate using his username/password. This action provides two information user_login (username) and userdata. And we will use this hook […]
WordPress Login Page Customization by filters, actions & plugins
Customize wordpress login,registration,reset page & login page logo/title/url address displayed through wp-login.php. Use action & filter hooks,do not edit core files
Add, Remove WordPress Admin Menu
WordPress admin menu is created by a single function using two global variables as parameter. See file wp-admin/menu-header.php, line 170-171 – wordpress version.3.1.1. _wp_menu_output( $menu, $submenu ); do_action( ‘adminmenu’ ); To Add a top level menu item on WordPress admin menu section add_action( ‘admin_menu’, ‘my_admin_menu’ ); function my_admin_menu() { // parameters – add_menu_page( $page_title, $menu_title, […]
jQuery On Change Radio value

See how u can use radio button action with jquery. Get, set or compare selected radio button value.
List only logged in author’s posts – WordPress tricks
To list logged in author’s post and put an edit link after the title you can use following function: function logged_in_author_posts(){ if( !is_user_logged_in()) return false; $user_id = get_current_user_id(); query_posts( array( ‘post_type’ => ‘post’, ‘author’ => $user_id, ‘post_status’ => ‘publish’, ‘showposts’ => ‘-1’ )); if( have_posts()): echo ‘<h2>Your posts</h2>’; echo ‘<ul>’; while (have_posts()) : the_post(); echo […]
Create or modify wordpress post type with register_post_type function

Post type refers to the various structured data that is maintained in the WordPress posts table. To create a new or modify an existing post type, ‘register_post_type’ function is used. WordPress already has some built-in post types are post, page, attachment, revision, and nav-menu-item. Function Reference: For a quick reference of how to use ‘register_post_type’, […]
register_taxonomy – WordPress Function to Create or Modify Taxonomy

In WordPress, taxonomy is a grouping method for any post types. WordPress have five built-in taxonomy categories, post tags, nav_menu, post_format and link_category. categories, post tags and post_format are used for post_type post, nav_menu is used for post_type nav_menu_item, and link_category is used for post_type link. When built-in taxonomy are not enough, custom taxonomies are […]
Strip out all Html, Php, Js tags by wp_strip_all_tags WordPress Function

Strip out HTML, PHP, JS, CSS codes from any strings by wordpress function wp_strip_all_tags. Create wordpress site description meta from the page content by wp_strip_all_tags.
Hex color validation with regex

Php code for validating hex color
PHP Regular Expression Character Definition

To user PHP regular expression with preg_match, preg_replace or other preg_ function, one should understand the characters that are used. Below listed all of the characters that are used in regex. List of Regular Expression Characters ^ // Match the beginning of the line . // Match any character (except newline) $ // Match the […]