Description, image and banner
-
Hey. Thanks for the plugin.
I’m shocked. Why the hell is it so hard !? I am not prepared in php. I read all the answers on this forum and and experimented with code for many hours, but I could not do the simplest thing that could be:
Display description
Display image
Display bannerI found the answer how to display a description:
//Brand description shortcode function custom_pwb_brand_info() { //show brand description if( is_product_taxonomy() ){ $brands = wp_get_post_terms( get_the_ID(), 'pwb-brand' ); foreach( $brands as $brand ) { echo '<p>'.$brand->description.'</p>'; } } } add_shortcode( 'custom_pwb_brand_info', 'custom_pwb_brand_info' );
Where can I add this code to display a brand image?
$attachment_id = get_term_meta( $brand->term_id, 'pwb_brand_image', true ); $attachment_src = wp_get_attachment_image_src( $attachment_id,'full' );
And how can I display banner images?
// And further. I add a filter
pwb_description_allowed_tags
infunctions.php
and it does not work!
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Description, image and banner’ is closed to new replies.