You should use <a href=”<?php echo bloginfo(‘url’); ?>”>
instead of <a href=”<?php echo esc_url( home_url( ‘/’ ) ); ?>”>
so that, when selecting a different language, the selected language gets stuck on home url.
You should use <a href=”<?php echo bloginfo(‘url’); ?>”>
instead of <a href=”<?php echo esc_url( home_url( ‘/’ ) ); ?>”>
so that, when selecting a different language, the selected language gets stuck on home url.
Expanding on the previous example, here are two snippets that disable the Admin Bar for non-Admins and Editors. Place either of the following in functions.php
:
// show admin bar only for admins
if (!current_user_can('manage_options')) {
add_filter('show_admin_bar', '__return_false');
}
// show admin bar only for admins and editors
if (!current_user_can('edit_posts')) {
add_filter('show_admin_bar', '__return_false');
}
As you might guess, any setting may be used for current_user_can()
, so it’s easy to show/hide the Admin Bar for any particular group of users.
More on digwp.com/2011/04/admin-bar-tricks/
In admin on Woocommerce->Settings->General check ‘Allow registration on the “My Account” page’
In order to receive the product link (saved as Attribute), you’ll need to open
twentyoku/woocommerce/content-product.php and
[php]
//global $product;
$product_link = woocommerce_get_product_terms( $product->id, ‘pa_link’, ‘names’ );
var_dump($product_link);
[/php]