Forum Replies Created

Viewing 1 replies (of 1 total)
  • Thread Starter hobbitme

    (@hobbitme)

    I’ve tried inserting the shortcode in my theme’s template using echo do_shortcode(”) but the following error occurs:
    Warning: call_user_func() expects parameter 1 to be a valid callback, class 'f' not found in [removed for privacy reasons]/wp-content/plugins/real-estate-listing-realtyna-wpl/global.php on line 57

    What I want to achieve is to display custom results for different users based upon their user fields, so if a user is from New York to show only the results for that city i.e.

    <?php $user_info = get_userdata(1);
          $city = $user_info->city;
           echo do_shortcode('[sf_locationtextsearch="$city"]');
    ?>

Viewing 1 replies (of 1 total)