Promote your Service and Product online Contact us

+91 87 44 999667; +91 99 11 883996 info@3pixls.com, sales@3pixls.com

Showing prices without VAT based on roles

November 3rd, 2016 by

Showing prices without VAT based on roles Function that will check for user role and turn off VAT/tax for that role [php] function wc_diff_rate_for_user() { // check for the user role if ( is_user_logged_in() && current_user_can( ‘wholesale_customer’ ) ) { // set the customer object to have no VAT WC()->customer->is_vat_exempt = true; } } add_action( […]

Automatically create meta description from the_content

September 21st, 2016 by

Adding this snippet to the functions.php of your wordpress theme will automatically create a meta description from your wordpress post striping out all shortcodes and tags. Make sure you have in the header.php of your wordpress theme or this snippet will not work. [php] function create_meta_desc() { global $post; if (!is_single()) { return; } $meta […]

Customize ‘Edit My Profile’ URL in WordPress Admin Bar

August 11th, 2016 by

A lot of sites have custom profile pages (not the general one you find in the WordPress admin > Users > Your Profile/Edit My Profile). Profile After building an awesome edit profile page – your users log in, see the WordPress admin bar, click “Edit My Profile” and they end up at the WordPress general […]

Remove Default Items from the Toolbar WordPress

August 10th, 2016 by

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]

Overwrite the “Howdy” Message in admin toolbar WordPress

August 9th, 2016 by

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 […]


Warning: Undefined variable $additional_loop in /home/pixlscom/public_html/blog/wp-content/themes/3pixelsblog/index.php on line 34

Warning: Attempt to read property "max_num_pages" on null in /home/pixlscom/public_html/blog/wp-content/themes/3pixelsblog/index.php on line 34