Support » Plugin: VVAme chat » Generic number for category page

  • Hi, how do i change the whatsapp number for the category main page? How it’s structured now is that every vendor listing has got it’s own individual whatsapp number while every other page will be the generic number. However, I cannot seem to control the number for the individual category page (i.e. nails/facial etc). How do i do that?

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor davidlillo


    What you propose is very interesting and we have decided to implement👏🏼. We are working on it👩🏻‍💻. Thanks for contributing good ideas to improve our plugin🎉.

    Plugin Author Creame


    You can do it adding a bit of code in your theme functions.php:

    add_filter ( 'whatsappme_get_settings', function ($settings, $obj) {
        // In a custom category archive page
        if (is_a( $obj, 'WP_Term' ) and $obj->slug == 'nails') {
            $settings['telephone'] = '99999999999'; // your category phone
        // In a post of custom category
        if (is_a( $obj, 'WP_Post' ) and has_term('nails', 'job_listing_category', $obj)) {
            $settings['telephone'] = '99999999999'; // your category phone
        return $settings;
    }, 10, 2 );

    This for your your example. In other cases you need to replace 'nails' with the target category slug and 'job_listing_category' if need to target other taxonomy.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Generic number for category page’ is closed to new replies.