You are now in Wordpress
Output which theme template file a post/page is using in the header of WordPress
This is a tip to help developers when creating or editing a WordPress template. This is a dead simple code and is especially useful for big templates (like a magazine style or e-commerce). It will show which template are being currently used by WordPress. add_action(‘wp_head’, ‘show_template’); function show_template() { global $template; print_r($template); }
Veja MaisEnable GZIP output compression on a WordPress Blog
This is a great optimization code for any wordpress blog out there. Some servers might do it automatically, others don’t, in case of doubt just create the code below in the functions.php file and see your bandwidth consumption go down just like your site loading time. if(extension_loaded(“zlib”) && (ini_get(“output_handler”) != “ob_gzhandler”)) add_action(‘wp’, create_function(”, ‘@ob_end_clean();@ini_set(“zlib.output_compression”, 1);’));
Veja MaisHow to Unregister WordPress Default Widgets
Tired of that huge amount of Widgets list cluttering the add/remove widget page? With this piece of code you are going to be able to remove all that unused ones and keep only the ones you might use. // unregister all default WP Widgets function unregister_default_wp_widgets() { unregister_widget(‘WP_Widget_Pages’); unregister_widget(‘WP_Widget_Calendar’); unregister_widget(‘WP_Widget_Archives’); unregister_widget(‘WP_Widget_Links’); unregister_widget(‘WP_Widget_Meta’); unregister_widget(‘WP_Widget_Search’); unregister_widget(‘WP_Widget_Text’); unregister_widget(‘WP_Widget_Categories’); [...]
Veja MaisHow to Remove Plugin Update Notice for Inactive plugins in WordPress
This is a very easy code to implement that will make the Admin life easier in a WordPress blog. With this code we are going to remove the notice to update plugins that shows even for the inactive ones. function update_active_plugins($value = ”) { /* The $value array passed in contains the list of plugins [...]
Veja MaisHow to Customize WordPress Admin Menu Order
This piece of code allows you to change the position of the elements in the admin menu. All you need to do is click on an existing link in the admin menu and copy everything before the /wp-admin/ URL. In the code below we a new order the admin menu will have: // CUSTOMIZE ADMIN [...]
Veja MaisHow To Add Custom WordPress User Profile Fields
Ever wondered how to add that piece of extra information about the users in your WordPress site? Fear no more! Bellow is a very easy code to implement in your functions.php file that will allow you to add any and every type of information you want to save about your users. // CUSTOM USER PROFILE [...]
Veja MaisHow to Remove Default WordPress Meta Boxes
Want to get rid of some specific Meta Box in WordPress Admin pages where you add or edit pages and blog posts? Thats actually quite easy, besides the fact that you can do that through the top options panel (Screen Options), you can also do that permanently by using the code below in the functions.php [...]
Veja MaisSet a maximum number of post revisions in WordPress and avoid DB bloat.
By default, WordPress will save an infinite amount of versions of each and every post of yours. That means that some posts, heavily edited, can easily reach 10 or more versions. That ends up causing some really unnecessary loading on your blog, to avoid that you can easily limit the number of revisions by adding [...]
Veja MaisOptimizing WordPress: Loading jQuery from the Google CDN
In this post you will find out a really underrated optimization for WordPress. This code cancels the jQuery load from the WordPress default install and in exchange will load the jQuery direct from Google CDN, making your site faster and more robust. // even more smart jquery inclusion add_action( ‘init’, ‘jquery_register’ ); // register from [...]
Veja MaisInclude custom post types in the WordPress Search Results
Below is a must do code for anyone working with custom post types in wordpress. It includes those custom post types in the search results of WordPress. // MAKE CUSTOM POST TYPES SEARCHABLE function searchAll( $query ) { if ( $query->is_search ) { $query->set( ‘post_type’, array( ‘site’, ‘plugin’, ‘theme’, ‘person’ )); } return $query; } [...]
Veja MaisRemove Update Notification for all users except ADMIN User
Are you tired of all that notification on your WordPress Admin showing to every user (no mater which level of permission they might have) that log in? The code bellow you make sure that only the Admin permission level will be able to see the available updates. // REMOVE THE WORDPRESS UPDATE NOTIFICATION FOR ALL [...]
Veja MaisModify the Login Logo & Image URL on your WordPress Login Form
Ever wondered how to change the logo of your WordPress Login Form in order to make it more customized? This is something especially useful when you’re selling the site to a customer. Here’s how to do it. The code will allow you to easily modify the WordPress Login page Logo as well as the href [...]
Veja MaisHow To Enable Hidden Admin Feature displaying ALL WordPress Settings
Ever wondered how to enable all WordPress Site configuration on your admin interface? This may be useful mostly when you want to avoid have to access the database of your blog just to change some minor configuration. In order to make it work just paste the code bellow in your functions.php file // CUSTOM ADMIN [...]
Veja MaisRead Next Fly Box
We at Plulz are proud to announce our new plugin, its the Read Next Fly Box and can already be found working on our site. The objective of this plugin is to increase the time a user spends on the site by lowering bounce rate and increasing page/views and time on site. This plugin randomly [...]
Veja MaisWordPress 3.4 soon to be released
WordPress 3.4 version is planned to be released soon, its currently in the Beta 2 stage. I think the team working on WordPress must be getting really big since they are updating the CMS in a really fast pace lately. This time we aren’t going to see many changes, looks like the work on the [...]
Veja MaisHow to Create a Plugin for WordPress
There are two ways of creating a wordpress plugin, the correct way and the common way. The common way is to just throw functions in the main PHP file that goes in the plugin folder and hope that everything works just fine in the millions of different types of wordpress installations. The correct way, is [...]
Veja MaisBest WordPress Hosting
WordPress is a CMS that isn’t really much demanding when talking about server resources, but definitely requires some attentions on that part. That line, however, have been changing lately, mostly after the release of the 3.0 version. The system started to consume more and more resources from the servers so a good hosting is a [...]
Veja MaisHow to change your WordPress Domain
This is a problem that many users face sometimes, moving wordpress domains is not an easy task because you have many things to consider, if you just move your files and don’t change the correct configurations in the database you will break everything on your site, another common problem is that after you migrate to [...]
Veja MaisHow To Disable Comments on Wordpres
This is a very common question i have been asked lately. Specially because of the Seo Facebook Comments Plugin. Which many people don’t know is that you can easily disable a comment for a specific post or page by changing a configuration on the edit page of this post or page. All you have to [...]
Veja MaisHow to Pass WordPress Database Information to the Front-End for Javascript/Ajax
Thats one of the nicest things I have recently come across while playing around with wordpress, i was currently trying to pass information from the database, dynamically, to the front end to use this information in ajax requests and dynamic validation with javascript. The key, in this case my friends, is to use the wp_localize_script() [...]
Veja MaisHow to Enable the WordPress Menu Built-In
WordPress implemented a feature for some versions now, the register_nav_menu function, with this method you can create as many menus as you want and handle through the admin panel, which, by the way, it’s a great feature and that was needed for quite a long time. To use this function is very simple, open your [...]
Veja Mais