-
Author
Tagged: woocommerce, products vendor
-
April 21, 2015 at 18:36 #55397MeshupParticipant
I found this in woocommerce support
But the name is showed in the link tag after the image tag.
How i can put right after the product’s title?
This is the code:
COPY CODE/** * Print the product's vendor name before the product title in the loop. * * @return void */ function wc_vendors_name_loop() { $vendors = get_the_terms( get_the_ID(), 'shop_vendor' ); if ( $vendors && ! is_wp_error( $vendors ) ) { foreach ( $vendors as $vendor ) { $all_vendors[] = $vendor->name; } $vendors = join( ", ", $all_vendors ); echo '<span class="shop_vendors">' . $vendors . '</span>'; } } add_action( 'woocommerce_before_shop_loop_item_title', 'wc_vendors_name_loop', 20 );
Could you help me?
April 21, 2015 at 19:09 #55401sharmstrModeratorThis is touching Kleo code, so I havent tried this. But you can see this part “woocommerce_before_shop_loop_item_title”. Try changing it to “woocommerce_after_shop_loop_item_title”
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionThis support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com
April 21, 2015 at 19:12 #55403MeshupParticipantDone. The name now appears after the price.
Is it possible to place between title and price?
April 21, 2015 at 19:19 #55408sharmstrModeratorThe only other hook is woocommerce_after_shop_loop_item.
If you need to put it somewhere else beside the hooks woo gives you, you need to ask them or you need to edit /kleo/woocommerce/content-product.php
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionThis support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com
-
AuthorPosts
The forum ‘General questions’ is closed to new topics and replies.