Increase size of vendor badges

We're shifting our Forum based support to a more dedicated support system!

We'll be closing our Forum support from 10th June, 2020 and move to Email Support assistance.

  • If you are a WCFM premium add-ons user, contact us- here
  • Want to know more before buying our add-ons? Send Pre sale queries- here
  • If you are a WCFM free user, please open a support ticket at WordPress.org
  • For WCFM App related queries, reach us- here
From now the forum will be read-only!

Viewing 12 reply threads
  • Author
    Posts
    • #23651
      Kristin
      Guest

      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?

    • #23657
      WCFM Forum
      Keymaster

      Hi,

      CSS is the only option for this right now.

      I will know right CSS for the purpose.

      Thank You

    • #23673
      Kristin
      Guest

      Thanks… is that something you are going to provide for me?

    • #23674
      WCFM Forum
      Keymaster

      HI,

      Yeah right, try this –

      a.wcfm_vendor_badge img, div.wcfm_vendor_badge img {
          width: 40px;
      }

      Thank You

    • #23688
      Kristin
      Guest

      Thanks but that didn’t have any effect, as far as I could see. I placed it in my child theme’s custom CSS.

    • #23689
      WCFM Forum
      Keymaster

      Hi,

      Then change to this –

      a.wcfm_vendor_badge img, div.wcfm_vendor_badge img {
          width: 40px !important;
      }

      Thank You

    • #23690
      Kristin
      Guest

      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.

    • #23691
      Kristin
      Guest

      Okay… I think I got it through a combo of the code you provided plus additional CSS. Thanks!

    • #23693
      Kristin
      Guest

      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.

    • #23694
      WCFM Forum
      Keymaster

      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

    • #23695
      Kristin
      Guest

      That filter works great except it also removes the badges from the individual product pages – is there any way to exclude those?

    • #23696
      WCFM Forum
      Keymaster

      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

    • #23697
      Kristin
      Guest

      Perfect! Thanks!!! 🙂

Viewing 12 reply threads
  • The topic ‘Increase size of vendor badges’ is closed to new replies.