http://wcruiser.com/wp-content/themes/wp-clear/images/image.jpg

All Entries in the "Knowlage Base" Category

Case Study: Fatal error – Call to undefined function wp_dashboard_setup() in /home/username/public_html/wp-admin/index.php on line XX

Case Study: Fatal error – Call to undefined function wp_dashboard_setup() in /home/username/public_html/wp-admin/index.php on line XX

Problem Summary:
Many wordpress users getting this error message when they try to login into the wordpress admin area:
Fatal error: Call to undefined function wp_dashboard_setup() in /home/username/public_html/wp-admin/index.php on line xxx
Possible Solution:
It seems that it is due to the PHP version and settings changed on the hosting server. In order to resolve this problem, you have to [...]

How To Limit Tag Cloud In WordPress Blog?

How To Limit Tag Cloud In WordPress Blog?

You can set Tag Cloud limit on your wordpress blog which can help to control page rank flow. In order to limit the Tag Cloud on wordpress blog, you have to edit the core file of the wordpress. First, fine this file yourdomain.com/wp-includes/category-template.php and download it to your local machine using ftp.
Find This Code:
unction wp_tag_cloud( [...]

Case Study: WordPress database error in WPDB Class

Case Study: WordPress database error in WPDB Class

When user trying to manipulation on WordPress Database using $wpdb class, the following error or similar error may appear:
Error Message:
WordPress database error: [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near…]
Possible Solutions:
One of the reasons for the errors is [...]

How To Get WordPress Post ID outside the Loop as PHP variable

How To Get WordPress Post ID outside the Loop as PHP variable

In the wordpress loop section, each posts displayed on the page with defined format along with such criteria decided by administrator. The Loop template tag the_ID can be used to easily display the post’s ID inside the post.
Alternatively, inside the the_content filter, declare $id global and use $id to retrieve the post ID. the_ID template [...]

Case Study: array_key_exists WordPress Warning/Error – The first argument should be either a string or an integer in

Case Study: array_key_exists WordPress Warning/Error – The first argument should be either a string or an integer in

Problem Error:
Warning: array_key_exists() [function.array-key-exists]: The first argument should be either a string or an integer in /your-sitepath/wp-includes/category-template.php on line 176
Possible Solution:
- This problems stems from line 176 as stated above. The simple fix is to make sure the first argument is a string, to do this we will rap it in double quotes.
Change line 176 [...]

Case Study: Fatal error: Call to undefined function: str_split() on WordPress Blog

Case Study: Fatal error: Call to undefined function: str_split() on WordPress Blog

Problem Summary:
I have upgraded wordpress version to the latest along with plugins. I have encountered this error message on my blog as well as while trying to login into the admin area of the blog:
Fatal error: Call to undefined function: str_split() in /home/…/htdocs/wp-content/plugins/pods/init.php on line 27
Possible Solution:
- str_split is a PHP 5 function. It seems [...]

How To Change BackGround Image In WordPress Blog

How To Change BackGround Image In WordPress Blog

In order change the background image of your blog, you need to upload the image in image folder of your theme. Image must be the same pixel as the old image. Othewise it may wrap the page.
Image folder path: blog-directory/wp-content/themes/theme-folder/images
Image name should be; bg.jpg

How To Move Sidebar In WordPress Theme

How To Move Sidebar In WordPress Theme

Many wordpress users likes the theme but wants to change the sidebar angle from left to right and visa versa. I have described here how to switch the sidebar in wordpress theme. I have provided details here to move sidebar from left to right.
In order to change the sidebar angle, you need to edit the [...]

General Guidelines For WordPress Theme Development

General Guidelines For WordPress Theme Development

These are the documentation – guidelines for wordpress theme development:
1. Indicate precisely what your Theme and template files will achieve.
2. Adhere to the naming conventions of the standard theme hierarchy.
3. Indicate deficiencies in your Themes, if any.
4. Clearly reference any special modifications in comments within the template and style sheet files. Add comments to modifications, [...]

How TO Display Latest Author Who Has Modified The Post In WordPress Blog

How TO Display Latest Author Who Has Modified The Post In WordPress Blog

WordPress 2.8+ has new feature of the_modified_author() which allows you to display the latest who has modified the post. In order to display the modified post author you can use this hack and add this code in functions.php file:
if (!function_exists(‘get_the_modified_author’)) {
function get_the_modified_author() {
global $post;
if ( $last_id = get_post_meta($post->ID, ‘_edit_last’, true) ) {
$last_user = get_userdata($last_id);
return apply_filters(‘the_modified_author’, [...]

How To Detect Visitors Web Browser Details Within WordPress Blog

How To Detect Visitors Web Browser Details Within WordPress Blog

Many wordpress theme is not supported perfectly in many web browsers. In order to detect the visitors’ web browser, you can use this hack. For that you need to add this code in functions.php file of your theme:
<?php
add_filter(‘body_class’,’browser_body_class’);
function browser_body_class($classes) {
global $is_lynx, $is_gecko, $is_IE, $is_opera, $is_NS4, $is_safari, $is_chrome, $is_iphone;
if($is_lynx) $classes[] = ‘lynx’;
elseif($is_gecko) $classes[] = ‘gecko’;
elseif($is_opera) $classes[] [...]

How To Display Tags In DropDown Menu In WordPress Blog

How To Display Tags In DropDown Menu In WordPress Blog

Tag Cloud may be not diosplay properly. In order to over come from that situation, you can use this hack to display tags in drop down menu. For that you need to add this code in functions.php file of your blog:
<?php
function dropdown_tag_cloud( $args = ” ) {
$defaults = array(
‘smallest’ => 8, ‘largest’ => 22, ‘unit’ [...]

How To Insert Special Characters Between Menu WordPress Blog

How To Insert Special Characters Between Menu WordPress Blog

Many wordpress users wants to add special character in their menu list. Wp_list_pages is very useful function of wordpress to display the pages in menu. Whenever you would like to add special character ike ‘|’, ‘//’ etc.., you can use this hack. You need to add this code where you want to add the special [...]

How To Disable Please Update Now Message In WordPress Dashboard

How To Disable Please Update Now Message In WordPress Dashboard

When a new version of WordPress is available, update now WordPress message is displayed on your dashboard. It is always better so that you can identify the latest released version and upgrade the installed. But many wordpress users wants to disable this message on their dashboard. For that you need to add this code in [...]

How To Add Gravatar To WordPress Default Gravatar List In WordPress Blog

How To Add Gravatar To WordPress Default Gravatar List In WordPress Blog

WordPress allows to choose default Gravatar to be displayed on comments when the commentator do not use Gravatars. If you want to add your own avatars to the list then you need to use this hack. For that add this code in functions.php file of your theme:
if ( !function_exists(‘fb_addgravatar’) ) {
function fb_addgravatar( $avatar_defaults ) {
$myavatar [...]

How To Disable Search Engine Indexing On A Particular Category In WordPress Blog

How To Disable Search Engine Indexing On A Particular Category In WordPress Blog

Many wordpress users do not want to index their images or some posts or category. We have already discussed about the images and posts. In this section I have described about the category indexing.
First, get the Category ID which you like to not indexed by search engines. Now, open your header.php file and add this [...]

How To Add Private Pages In Navigation Menu Of WordPress Blog

How To Add Private Pages In Navigation Menu Of WordPress Blog

If you are using private pages and want to display then in navigation menu then use this hack. For that open the file where your navigation code is and add this code:
<ul>
<?php
wp_list_pages(‘depth=1&title_li=0&sort_column=menu_order’);
if(current_user_can(‘read_private_pages’)) :
?>
<li><a href=”<?php echo get_permalink(10); ?>”>For Authors only</a></li>
<?php endif; ?>
</ul>
Now, navigation menu displays private pages when specific user is login into blog.
That’s it!

How To Add Top To The Page Link WordPress Blog

How To Add Top To The Page Link WordPress Blog

If wordpress blog index page or category page has too many posts and users want to go to the top then they have to scroll up to the top. To overcome from this problem, you can add a link at the bottom of the posts on category or index page through which users can directly [...]

How To Remove /Category/ From WordPress Category URL

How To Remove /Category/ From WordPress Category URL

WordPress Categories permalink by default adds /Category/. In order to remove it from the permalink settings of category, you need to first backup your .htaccess file. After that open it and add this code:
RewriteRule ^category/(.+)$ http://www.yourblog.com/$1 [R=301,L]
Now, If your categories page default URL is:
http://www.wcruiser.com/category/
Once you save above code in htaccess, it will be set at:
http://www.wcruiser.com/
That’s [...]

Case Study: Double Home Tab In WordPress Theme

Case Study: Double Home Tab In WordPress Theme

Problem Summary:
I have added static home page on my home and now it is showing double home page tabs in Header. How do I fix it?
Possible Solutions:
It seems that you have added the static page with home name. For you need to either the default home from the navigation list of your blog. You can [...]