titodevera
Forum Replies Created
-
Forum: Plugins
In reply to: [Perfect Brands for WooCommerce] Brand positionWell. I have installed “Savoy (1.3.1)”. The theme is overriding
content-product.php
template (savoy > woocommerce > content-product.php). In this case thewoocommerce_before_shop_loop_item_title
hook is injecting the code before the product thumbnail as you have said. I think you should ask to the theme’s support, because it is a theme’s issue.??
Forum: Plugins
In reply to: [Perfect Brands for WooCommerce] Brand positionBy default, this code adds the brand just after the thumbnail. You can test it using a clean theme (like twentysixteen). Is posible that your current theme has the product loop modified.
What theme are you using?
??
Forum: Plugins
In reply to: [Perfect Brands for WooCommerce] Brand positionTry this:
function pwb_show_brands_in_loop(){ global $product; $product_id = $product->id; $product_brands = wp_get_post_terms($product_id, 'pwb-brand'); if(!empty($product_brands)){ echo '<div class="custom-loop-brands">'; foreach ($product_brands as $brand) { echo '<span>'.$brand->name.'</span>'; } echo '</div>'; } } add_action('woocommerce_before_shop_loop_item_title', 'pwb_show_brands_in_loop');
??
Forum: Plugins
In reply to: [Perfect Brands for WooCommerce] New Instal triggering fatal errorYou’re welcome! Don’t forget to leave a review if you like the plugin ??
Forum: Plugins
In reply to: [Perfect Brands for WooCommerce] how to put brands on shop pageAt this point PWB supports product carousel too, so i think this topic is resolved ??
Resolved ??
Forum: Plugins
In reply to: [Perfect Brands for WooCommerce] How to change displayYou’re welcome! Don’t forget to leave a review if you like the plugin ??
Forum: Plugins
In reply to: [Perfect Brands for WooCommerce] How to change displayWell, there are several ways to do it:
1) You can add the custom CSS directly to your theme’s stylesheet (styles.css).
2) Some themes allows you to add custom CSS code through admin panel
3) Install a plugin like this: https://es.www.ads-software.com/plugins/simple-custom-css/
??
Awesome montebianco! It works like a charm!
How can i link the echo ‘<span>’.$brand->name.'</span>’; with an a href= of the brand link?
I think that it is not posible (using the suggested hook). The
woocommerce_before_shop_loop_item_title
hook inserts the code into a link pointing to the product. Obviously it is not posible to include a link inside another link.But… you can use other hook that injects the code outside the product’s link…
function pwb_show_brands_in_loop(){ global $product; $product_id = $product->id; $product_brands = wp_get_post_terms($product_id, 'pwb-brand'); if(!empty($product_brands)){ echo '<div class="custom-loop-brands">'; foreach ($product_brands as $brand) { echo '<a href="'.get_term_link($brand->term_id).'">'.$brand->name.'</a>'; } echo '</div>'; } } add_action('woocommerce_after_shop_loop_item', 'pwb_show_brands_in_loop',1);
??
Forum: Plugins
In reply to: [Perfect Brands for WooCommerce] Brand Page Archive DescriptionHello.
Adds this code to your functions.php
function pwb_custom_brand_desc(){ if(is_archive()){ $paged = get_query_var( 'paged' ) ? absint( get_query_var( 'paged' ) ) : 1; if($paged!==1){ echo '<style>.archive.tax-pwb-brand .pwb-brand-description{display:none;}</style>'; } } } add_action('wp_footer', 'pwb_custom_brand_desc');
??
Forum: Plugins
In reply to: [Perfect Brands for WooCommerce] Need HelpForum: Plugins
In reply to: [Perfect Brands for WooCommerce] New Instal triggering fatal errorCan you give us more details about the error? Do you meet the requirements of the plugin?
Requirements:
PHP 5.3 or higher WordPress 4.4 or higher WooCommerce 2.4.0 or higher
Thanks
Forum: Plugins
In reply to: [Perfect Brands for WooCommerce] Need HelpEach product (like other posts) have a unique ID. This shortcode allows you to show the brand names (or logos if are assigned) of a certain product. There are a lot of ways to get the ID of a product, for example, entering in the product edition and seeing the url. You can use shortcodes in any page or post
UPDATE
There is a new release (1.4.2) available that fixes this bug. Update the plugin.Thanks
Forum: Plugins
In reply to: [Perfect Brands for WooCommerce] Need HelpUPDATE
There is a new release (1.4.2) available that fixes this bug. Update the plugin.Thanks