Mahmood Yaqub

Web Developer, SEO Expert, SEM, Online Strategic Analyst

Remove admin bar for WordPress user & subscribers

To remove wordpress admin bar for users, subscribers, contributors etc add the following code to functions.php somewhere below <?php

// disable the admin bar
show_admin_bar(false);

Alternatively you can go to wp-admin > All Users > Edit User > Uncheck option Show Toolbar when viewing site.

Hope it helps!

17 December 2011 at 16:18 - Comments

Delete WordPress Unapproved Comments phpMyAdmin

The following SQL query allows youto Delete WordPress unapproved comments through phpMyAdmin.

DELETE FROM wp_comments WHERE comment_approved = 0

Please back up your wordpress database before you make any changes.

5 September 2011 at 15:15 - Comments

Remove Title Attribute From Navigation Menus

Many prefer the built in page and category navigation so they won’t have to set it up for new items or just because that is what they are comfortable with. Often it might be desired to remove the title attribute assigned to menu items by WordPress. As with many things, this can be done in more than one way.

This method filters the list output directly and prevents any title from showing. Add this to your functions.php file to remove the title from categories.

Open up the functions.php file in your child theme and add the following code. The code should be entered at the end of the file, just before the closing ?> if there is one.

function wp_list_categories_remove_title_attributes($output) {
$output = preg_replace('` title="(.+)"`', '', $output);
return $output;
}
add_filter('wp_list_categories', 'wp_list_categories_remove_title_attributes');

Article Source
26 August 2011 at 04:26 - Comments

wp_commentmeta fix for WordPress

How to Reduce the size of wp_commentmeta. Many bloggers have addressed an issue that the size of the wp_commentmeta is growing huge tracking it back to a bug in akismet plugin. No you cannot delete wp_commentmeta completely. To fix this use the following sql statement via phymyadmin

DELETE FROM wp_commentmeta WHERE comment_id NOT IN (SELECT comment_id FROM wp_comments)

Just tried it on one of my website reduced the size from 151.52 MB to 44KB. You can always manually delete the akismet meta key rows.

Always be smart, have a database backup.

22 August 2011 at 06:05 - Comments

Pakistani Community Consumer Influence

11 July 2011 at 22:17 - Comments