Copy the function below and paste it into your functions.php file. The code will automatically raise an error if someone try to publish a post which is below the minimum allowed word count, defined on line 3
The only thing you have to do is to copy the following function and paste it on your theme functions.php file. Once saved, the post/page name will be automatically be added to the body class. function wpprogrammer_post_name_in_body_class( $classes ){ if( is_singular() ) { global $post; array_push( $classes, “{$post-> post_type}-{$post-> post_name}” ); } return $classes; } add_filter( 'body_class', 'wpprogrammer_post_name_in_body_class' ); Thanks to Utkarsh Kukreti for this great hack! Looking for WordPress hosting
New plugins Custom sidebars allows you to create your own widgetized areas and custom sidebars, and select what sidebars to use for each post or page.
The first thing to do is to add the following code to your wp-config.php file. This file is located at the root of your WordPress install.
CSS2 allows you to specify stylesheet for specific media type such as screen or print . Now CSS3 makes it even more efficient by adding media queries.
Open your single.php (or any file where you’d like the “Like” button to be displayed), and paste the following code:
Simply run the following SQL query on your WordPress database, using the command line client or PhpMyAdmin. This will close pingbacks/trackbacks on all existing posts
You don’t have to burn books to destroy a culture. Just get people to stop reading them.
As usual, let’s start by pasting the function in your functions.php file: function get_category_id($cat_name){ $term = get_term_by(‘name’, $cat_name, ‘category’); return $term-> term_id; } Once you saved the file, just call the function with your category name as a parameter.
WordPress hack: Get rid of HTML in comments
Just paste the code below into your functions.php file. If you prefer to use a plugin with the same functionality, you can grab one here .
Posted by WpRecipes.com · Read the full story »