Multi Vendor Marketplace Plugin | WCFM Marketplace › Forums › WCFM – Ultimate › Increase size of vendor badges
- This topic has 12 replies, 2 voices, and was last updated 5 years, 11 months ago by Kristin.
- AuthorPosts
- May 21, 2018 at 9:22 pm #23651KristinGuest
I would like to increase the size of the vendor badges everywhere they appear on the site. I tried to do this using CSS without much luck. Is there an easy way to increase the size sitewide? Or can you help provide the CSS to do so for the various locations where the badge appears?
- May 22, 2018 at 3:37 am #23657WCFM ForumKeymaster
Hi,
CSS is the only option for this right now.
I will know right CSS for the purpose.
Thank You
- May 22, 2018 at 2:12 pm #23673KristinGuest
Thanks… is that something you are going to provide for me?
- May 22, 2018 at 3:24 pm #23674WCFM ForumKeymaster
HI,
Yeah right, try this –
a.wcfm_vendor_badge img, div.wcfm_vendor_badge img { width: 40px; }
Thank You
- May 22, 2018 at 6:04 pm #23688KristinGuest
Thanks but that didn’t have any effect, as far as I could see. I placed it in my child theme’s custom CSS.
- May 22, 2018 at 6:06 pm #23689WCFM ForumKeymaster
Hi,
Then change to this –
a.wcfm_vendor_badge img, div.wcfm_vendor_badge img { width: 40px !important; }
Thank You
- May 22, 2018 at 6:18 pm #23690KristinGuest
Thanks – that helped. I would still like to get it bigger than what I seem to be able to do (even with adjusting the width number) but it’s a start.
- May 22, 2018 at 6:22 pm #23691KristinGuest
Okay… I think I got it through a combo of the code you provided plus additional CSS. Thanks!
- May 22, 2018 at 6:34 pm #23693KristinGuest
One other related question – is there a way to hide the badges on the product archives without also hiding them on the vendor shop page? I would prefer they show only in the banner area on the vendor page and on the individual product pages, but not on any archive pages.
- May 22, 2018 at 9:21 pm #23694WCFM ForumKeymaster
Hi,
Kindly add this line of code for the purpose –
add_filter( 'wcfm_is_allow_badges_in_loop', '__return_false' );
Well, for size I had set “40px” as random, you may set this more to show this much bigger.
Thank You
- May 22, 2018 at 9:36 pm #23695KristinGuest
That filter works great except it also removes the badges from the individual product pages – is there any way to exclude those?
- May 22, 2018 at 9:46 pm #23696WCFM ForumKeymaster
Hi,
Well, then use this code –
function wcfm_is_allow_badges_in_loop_custom( $is_allow ) { if( is_product() ) return $is_allow; return false; } add_filter( 'wcfm_is_allow_badges_in_loop', 'wcfm_is_allow_badges_in_loop_custom' );
Thank You
- May 22, 2018 at 10:59 pm #23697KristinGuest
Perfect! Thanks!!! 🙂
- AuthorPosts
- The topic ‘Increase size of vendor badges’ is closed to new replies.