We have a theme that sadly does not support the "description" of a brand on the Brands webpage.
I have looked it up but it does look a bit confusing and I can find no definitive "how to" to get it on there.
Any ideas?
We are using the ultimate brands woocommerce plugin.
Wordpress - anyone know how to force the Brands Description?
Moderator: General Moderators
-
simonmlewis
- DevNet Master
- Posts: 4435
- Joined: Wed Oct 08, 2008 3:39 pm
- Location: United Kingdom
- Contact:
Wordpress - anyone know how to force the Brands Description?
Love PHP. Love CSS. Love learning new tricks too.
All the best from the United Kingdom.
All the best from the United Kingdom.
Re: Wordpress - anyone know how to force the Brands Descript
Is it not showing anywhere or just on a particular page? Does it display if you switch to another theme? I looked quickly and the functionality appears to be provided by the plugin, not the theme.
-
simonmlewis
- DevNet Master
- Posts: 4435
- Joined: Wed Oct 08, 2008 3:39 pm
- Location: United Kingdom
- Contact:
Re: Wordpress - anyone know how to force the Brands Descript
The idea is that it should show on the Brand page, that shows all products for that particular brand.
...../brands/emile-et-rose/.
As you say, it's supported by the plugin and not the theme. Some themes allow it and some are not configured for it. I guess it's some code that is missing...
...../brands/emile-et-rose/.
As you say, it's supported by the plugin and not the theme. Some themes allow it and some are not configured for it. I guess it's some code that is missing...
Love PHP. Love CSS. Love learning new tricks too.
All the best from the United Kingdom.
All the best from the United Kingdom.
Re: Wordpress - anyone know how to force the Brands Descript
Don't have a ton of time to look into it right now -- though I can peek tonight if you haven't resolved it. Meanwhile, I can see that brand descriptions are stored in wp_term_taxonomy, so I'd look at get_terms() and related functions. Hope that gets you pointed in the right direction.
-
simonmlewis
- DevNet Master
- Posts: 4435
- Joined: Wed Oct 08, 2008 3:39 pm
- Location: United Kingdom
- Contact:
Re: Wordpress - anyone know how to force the Brands Descript
I found this earler to go on the product page, so each brand will show it's descrption on any product that uses it.
Be useful it I could do similar for the Brands own page?
Be useful it I could do similar for the Brands own page?
Code: Select all
add_action( 'woocommerce_single_product_summary' , 'woocommerce_brand_summary', 25 );
/**
* woocommerce_brand_summary
*
* @access public
* @since 1.0
* @return void
*/
function woocommerce_brand_summary() {
global $post;
$brands = wp_get_post_terms( $post->ID, 'product_brand', array("fields" => "all") );
foreach( $brands as $brand ) {
echo __( 'Brand Description', '') . ': ' . term_description( $brand->term_id, 'product_brand' );
}
}
Love PHP. Love CSS. Love learning new tricks too.
All the best from the United Kingdom.
All the best from the United Kingdom.