How to show popular posts in wordpress

Wordpress
Here I want to tech you how to get popular posts based on that post comment in wordpress withaout plugin. Display popular posts without plugin in wordpress | Get popular posts without plugin in wordpress To show lists of the popular posts in wordpress is very usefull features for getting post popularity wise or SEO to increase visitor or provide better output to the user. Many plugins are available to get popular posts in wordpress but here I want to show you how to get popular posts in wordpress without plugins. Opent function.php file and put it below code into them. [php] # Displays a list of popular posts <?php function dp_popular_posts($num, $pre='<li>', $suf='</li>', $excerpt=false) { global $wpdb; $querystr = "SELECT $wpdb->posts.post_title, $wpdb->posts.ID, $wpdb->posts.post_content FROM $wpdb->posts WHERE $wpdb->posts.post_status = 'publish'…
Read More

How I can get theme URL in wordpress

Wordpress
I want to get my wordpress theme URL to display image.Below is the code to get wordpress current theme URL. This function will return the theme directory URL so you can use it in other functions: [sourcecode language="plain"] get_bloginfo('template_directory'); [/sourcecode] Alternatively, this function will echo the theme directory URL to the browser: [sourcecode language="plain"] bloginfo('template_directory'); [/sourcecode] So an example for an image in the themes images/headers folder would be: [sourcecode language="plain"] <img src="<?php bloginfo('template_directory'); ?>/images/headers/image.jpg" /> [/sourcecode] [JWD-Wordpress-Development]
Read More

Install wordpress in blog name subdirectory

Wordpress
Wordpress not allow installing wordpress into subdirectory name with blog. Here are some step to remove this restrictions. WordPress hook directory : subdirectory_reserved_names Wp-admin/ms-edit.php line no:154 //$subdirectory_reserved_names = apply_filters( 'subdirectory_reserved_names', array( 'page', 'comments', 'blog', 'files', 'feed' ) ); $subdirectory_reserved_names = apply_filters( 'subdirectory_reserved_names', array( 'page', 'comments', 'files', 'feed' ) ); Wp-includes/ms-functions.php line no:516 //$subdirectory_reserved_names = apply_filters( 'subdirectory_reserved_names', array( 'page', 'comments', 'blog', 'files', 'feed' ) ); $subdirectory_reserved_names = apply_filters( 'subdirectory_reserved_names', array( 'page', 'comments', 'files', 'feed' ) ); OR Wp-includes/ms-functions.php on line 559 if (! is_subdomain_install() ) //$illegal_names = array_merge($illegal_names, apply_filters( 'subdirectory_reserved_names', array( 'page', 'comments', 'blog', 'files', 'feed' ) ) ); $illegal_names = array_merge($illegal_names, apply_filters( 'subdirectory_reserved_names', array( 'page', 'comments', 'files', 'feed' ) ) );   Wp-includes/ms-settings.php Line no: 73 //$reserved_blognames = array( 'page', 'comments', 'blog', 'wp-admin', 'wp-includes', 'wp-content', 'files', 'feed' ); $reserved_blognames =…
Read More

Easily manage or publish multisite using worpress 3.0.

Wordpress
Please look at below step for create multi site mode: Install WordPress 3.0 and install as a normal WordPress. Add define('WP_ALLOW_MULTISITE', true); near the top of wp-config.php Log into the admin go to the tools/Network menu. If it asks you to deactivate all plug-ins do so otherwise go straight ahead and set up multi sites as sub-domains and fill in the other details as needed as needed. Make a note of the changes needed to wp-config.php and .htaccess and make the changes. You should now be in multi-site mode. [JWD-Wordpress-Development]
Read More