Fresh News - Blog Design, Wordpress, Blogger, and Web Development

Magznetwork Fresh News aggregate our favorite blogs to watch our favorite topics about blog design, wordpress themes, and blogger templates.

How to define a minimum word count per post

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

WordPress hack: Automatically add post name to the body class

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

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 .

WordPress Plugin Releases for 08/28

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.

How to easily enable/disable debug mode in WordPress

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.

CSS3 Media Queries

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.

Add a Facebook “Like” button to your WordPress blog

Open your single.php (or any file where you’d like the “Like” button to be displayed), and paste the following code:

WordPress tip: Close trackbacks on all posts at once

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

Burn books to destroy a culture

You don’t have to burn books to destroy a culture. Just get people to stop reading them.

WordPress function: Get category ID using category name

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.