Wednesday 27 May 2015

How to disable admin bar in wordpress

Set the display status of the Toolbar for the front side of your website (you cannot turn off the toolbar on the WordPress dashboard).
Placing the above line of code in theme's function.php file will prevent the Toolbar from rendering on the front end of your site.
You can also determine for which users the admin bar is shown. For example the following lines will only display the admin bar for users with administrative privileges.

if ( ! current_user_can( 'manage_options' ) ) {
    show_admin_bar( false );
}
 
With newer version of WordPress you may need to use the following which 
will leave the Toolbar available in the Dashboard but hide it on all 
front facing pages. 
 
add_filter('show_admin_bar', '__return_false'); 

how to disable comments in wordpress

Settings >> Discussion >> uncheck "Allow people to post comments on new articles"
This applies to new posts that you will publish from now on. To disallow comments from already publish posts:
Posts >> select them all and "Edit" under bulk actions and hit apply >> choose "do not allow" next to comments and hit update posts. and other way

The topic title talks about "pages". Assuming that you want to continue have discussion on your blog posts but turn it off only from "pages, you'll have to remove the code snippet "<?php comments_template(); ?>" from the page.php of your theme, as mercime advised.

How to turn off wordpress update notification

For all the WordPress users, it is really annoying when WordPress update notice is displayed on the dashboard if there are any upgrade available for the installed WordPress version as shown in the figure below. The notice will not clear until the WordPress is upgraded to latest version. Similarly the update notice for installed plugins & themes is displayed on the WordPress dashboard, plugins & themes pages. Actually it is good to know that updates are available but administrators who maintain multiple installations of WordPress on behalf of other people (eg. clients) may not want theme update notifications to be shown to the users of these installations, then disabling such notifications becomes necessary. In this article, I will show how to disable update notifications for core WordPress as well as for plugins and themes.

1. To Disable Update WordPress nag :

Insert the following code to the functions.php file of your active theme. It will remove the WordPress update nag e.g. WordPress 3.9.1 is available! Please update now, from the all users dashboard, admin dashboard & from Updates page as well.

add_action('after_setup_theme','remove_core_updates');
function remove_core_updates()
{
 if(! current_user_can('update_core')){return;}
 add_action('init', create_function('$a',"remove_action( 'init', 'wp_version_check' );"),2);
 add_filter('pre_option_update_core','__return_null');
 add_filter('pre_site_transient_update_core','__return_null');
}
 

2. To Disable Plugin Update Notifications :

Insert the following code to the functions.php file of your active theme. It will remove the update notifications of all the installed plugins.

remove_action('load-update-core.php','wp_update_plugins');
add_filter('pre_site_transient_update_plugins','__return_null');
 

3. To Disable all the Nags & Notifications :

Insert the following code the functions.php file of your active theme. This code disables all the updates notifications regarding plugins, themes & WordPress completely.

function remove_core_updates(){
global $wp_version;return(object) array('last_checked'=> time(),'version_checked'=> $wp_version,);
}
add_filter('pre_site_transient_update_core','remove_core_updates');
add_filter('pre_site_transient_update_plugins','remove_core_updates');
add_filter('pre_site_transient_update_themes','remove_core_updates');
 
Apart form these codes there are some WordPress plugins available to Disable WordPress Update Notifications & Nags :
If you install & activate these plugins, you will have to keep yourself updated with the latest version of your active WordPress, plugins & themes so that your blog or website wont be susceptible to security vulnerabilities or performance issues. Just deactivate the plugin for short period of time & update yourself.
 

 

 

Tuesday 19 May 2015

how to change woocommerce language?

WooCommerce comes localization ready out of the box – all that’s needed is your translation, if the plugin does not come bundled with one for your language.
There are several methods to create a translation, most of which are outlined in the WordPress Codex. However, we find the easiest method is to use a plugin called Loco Translate. More advanced users can use PoEdit. Both methods are covered in this doc.

Before you begin 

WooCommerce includes a language file (.po or .pot file) which contains all of the English text. You can find this language file inside the plugin folder in woocommerce/i18n/languages/.

Set up WordPress

WordPress needs to be told which language it should run under.
  1. Go to: Dashboard > Settings > General and change the Site language.
Once this has been done, the shop will be displayed in your locale if the language file exists. Otherwise you need to create the language files (process explained below).

WooCommerce 2.2+ Language Packs 

From version 2.2, WooCommerce includes a language pack downloader. PO and MO files will no longer be bundled with the plugin – they will be downloadable from your dashboard if you have the WPLANG constant set, or from a git repository if you wish to grab them manually. A notice will be displayed within your administration:
Update WooCommerce 2.2+ Translation Packs
Update WooCommerce 2.2+ Translation Packs
If for some reason the translation packs install fails, you can force the download in WooCommerce > System Status > Tools > Force Translation Upgrade:
Force Translation Upgrade (WooCommerce > System Status > Tools)
Force Translation Upgrade (WooCommerce > System Status > Tools)
PO and MO files are copied in wp-content/languages/woocommerce/

How to re-order the product tabs?

Change it as you want it and add to the functions.php, but here is a snippet to put the reviews first, description second and additional info third:

add_filter( 'woocommerce_product_tabs', 'woo_reorder_tabs', 98 );
function woo_reorder_tabs( $tabs ) {
 
$tabs['reviews']['priority'] = 5; // Reviews first
$tabs['description']['priority'] = 10; // Description second
$tabs['additional_information']['priority'] = 15; // Additional information third
 
return $tabs;
}

Connect your eBay store to your WooCommerce shop with ease

Using this easy yet flexible plugin, you can link up your eBay store with your WooCommerce shop as well as benefit from all the added features, including verifying items and getting listing fees before actually listing them. WP-Lister for eBay plugin

WP-Lister for eBay Download

How to add videos to your products for customers to watch

This simple little "WooCommerce Video Product Tab"   plugin to  allows you to add a Video to the Product page with an additional tab that allows your customers to view the video you embedded..simple! Click below link to download this woocommerce addon


WooCommerce Video Product Tab  Download

How to remove the ‘reviews’ tab so that only ‘product description’ appears

Just add this little line of code to your custom.css file:
.woocommerce .woocommerce-tabs ul.tabs {display:none !important}

How to remove specific (or all) of the product tabs

Use this snippet in the functions.php if you want to remove any (or all) of the product tabs, such as the description and reviews:


       
add_filter( 'woocommerce_product_tabs', 'woo_remove_product_tabs', 98 );
function woo_remove_product_tabs( $tabs ) {
unset( $tabs['description'] ); // Remove the description tab unset( $tabs['reviews'] ); // Remove the reviews tab
unset( $tabs['additional_information'] ); // Remove the additional information tab
return $tabs;
}

Add a border around the product description

Modify the border size (1px, 2px, etc), style (solid, dotted, dashed) and color (#xxxxxx) to suit your needs in custom.css:
.woocommerce .woocommerce-tabs {border: 1px solid #e6e6e6}

Popular Articles