August 10th, 2016 by admin
Here is a simple solution I figured out [php] function my_edit_toolbar($wp_toolbar) { global $wp_admin_bar; $wp_admin_bar->add_menu( array( ‘parent’ => ‘user-actions’, ‘id’ => ‘new_media’, ‘title’ => __(‘Profile Edit’), ‘href’ => um_edit_profile_url( ”) ) ); } add_action(‘admin_bar_menu’, ‘my_edit_toolbar’, 999); [/php]
August 9th, 2016 by admin
First, we want to overwrite the “Howdy”. Add these lines in the functions.php of your theme. [php] function howdy_message($translated_text, $text, $domain) { $new_message = str_replace(‘Howdy’, ‘Welcome’, $text); return $new_message; } add_filter(‘gettext’, ‘howdy_message’, 10, 3); [/php] The above function replaces the “Howdy” with “Welcome” using the PHP str_replace function and applies the function through the WordPress […]
July 28th, 2016 by admin
Believe it or not, there is limitation on how many menu items you can add to your site. Well, it is not really WordPress limitation on menu, but rather the hosting company. I just had a clients who had over 80 menu items, yes, I know that is a lot. When she tried to add […]
July 13th, 2016 by admin
Adding this snippet to the “functions.php” of your wordpress theme will remove the HTML p tag from around images in the_content. [php] function filter_ptags_on_images($content){ return preg_replace(‘/<p>\s*(<a .*>)?\s*(<img .* \/>)\s*(<\/a>)?\s*<\/p>/iU’, ‘\1\2\3’, $content); } add_filter(‘the_content’, ‘filter_ptags_on_images’); [/php]
July 11th, 2016 by admin
See there are lots of unnecessary space between lines This is very easy to Remove unnecessary space Open the file Click CTRL + F Select “Current document” in “Find in” (You can also select the folder if you have multiple files) Search in “Source code” Tick “Use regular expression” Type “[\r\n]{2,}” (without quotes) in “Find” […]