Best Multi Vendor Marketplace Plugin for WordPress › Forums › WCFM – Ultimate › Increase size of vendor badges
- This topic has 12 replies, 2 voices, and was last updated 7 years ago by
Kristin.
- AuthorPosts
- May 21, 2018 at 9:22 pm #23651
Kristin
GuestI 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 #23657
WCFM Forum
MemberHi,
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 #23673
Kristin
GuestThanks… is that something you are going to provide for me?
- May 22, 2018 at 3:24 pm #23674
WCFM Forum
MemberHI,
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 #23688
Kristin
GuestThanks 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 #23689
WCFM Forum
MemberHi,
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 #23690
Kristin
GuestThanks – 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 #23691
Kristin
GuestOkay… I think I got it through a combo of the code you provided plus additional CSS. Thanks!
- May 22, 2018 at 6:34 pm #23693
Kristin
GuestOne 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 #23694
WCFM Forum
MemberHi,
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 #23695
Kristin
GuestThat 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 #23696
WCFM Forum
MemberHi,
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 #23697
Kristin
GuestPerfect! Thanks!!! 🙂
- AuthorPosts
- The topic ‘Increase size of vendor badges’ is closed to new replies.