Display Recent Posts From A Specific Category

This post is for advance users who want to display recent posts from a specific category. We have this article specially for you. Devtoolsplus users will most likely not use this. This tutorial is mostly used in creating magazine style themes. Please see the blow demo project image before applying into your theme. Here I…

Use Shortcodes Within WordPress Text Widget

Shortcodes Within WordPress

Some days ago I shared a tip on using PHP snippets within WordPress text Widgets. Here’s another equally handy snippet for using Shortcodes within WordPress text widget. To allow shortcodes within WordPress text widgets, simply edit the functions.php file from your theme and add the following code Shortcodes Within WordPress snippets add_filter(‘widget_text’, ‘do_shortcode’); Once you…

Prevent Google Analytics from Tracking Admin Pages

Prevent Google Analytics

Want to avoid Google Analytics from tracking your Admin pages? This handy snippet will prevent Google Analytics from tracking your Admin pages or anything else that you wish. Simply add this WordPress snippets after <body> starting tag <?php if (!current_user_can(‘level_10’)) { ?> /* Google Analytics Code */ <?php } ?> Here, level_10 is WordPress admin label…

Display Performance Statistics WordPress Pages

Performance Statistics

I know Everyone is familiar with the following information. It is Performance Statistics for WordPress Pages <!– 57 queries in 0.533 seconds –> These statistics are usually seen in the footer area of individual pages and serve as a general indicator of performance. The “queries” refer to the number of times WordPress requested information from…

Embed Google Books in Your Posts Using Shortcode

Embed google books

Many learners want to collect book from Google books. So you can embed Google books in your posts using shortcode in your WordPress site very easily. Especially some clients give task to their web developer to display Book from Google book. You can display this Google book by using WordPress plugin. But some clients want to avoid…

How to Access Post Data Outside Loop

Post Data Outside Loop

The easiest way to display and access  post data outside loop is to use the built-in WordPress core function get_post(); However, for more control over the process, check out this nifty little function from WP Recipes: function get_post_data($postId) { global $wpdb; return $wpdb->get_row(“SELECT * FROM $wpdb->posts WHERE ID=$postId”); } Place this function in your functions.php and…

Remove Admin Bar Link For Non Administrators

Remove Admin Bar WordPress

In the WordPress Dashboard, besides the main menu on the sidebar, you will also find a couple of menu links at the top. You can remove admin bar link from specific roles or users. This snippet below will remove the menu in the admin bar for users who aren’t an Administrator – adjust accordingly. Add…

Limit WordPress Post Revisions without plugin

Limit WordPress Post Revisions

In this Web developers resources I will Share a important WordPress snippets which will help you to save your hosting disc space by limit WordPress post revisions setting. When we create a post using WordPress admin panel It will save automatically post revision. This post revision will reduce your hosting disc space. You can disable…

Twitter Bootstrap Pagination for WordPress

Insert the below wordpress snippet into your functions.php. This snippet will create a numbered page navigation menu using Twitter Boostrap. <?php // Numeric Page Navi function page_navi($before = ”, $after = ”) { global $wpdb, $wp_query; $request = $wp_query->request; $posts_per_page = intval(get_query_var(‘posts_per_page’)); $paged = intval(get_query_var(‘paged’)); $numposts = $wp_query->found_posts; $max_page = $wp_query->max_num_pages; if ( $numposts <=…