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 […]

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 […]

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, […]

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 […]