Title: Help with pluggable function
Last modified: August 22, 2016

---

# Help with pluggable function

 *  Resolved [Artus](https://wordpress.org/support/users/tintalent/)
 * (@tintalent)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/help-with-pluggable-function/)
 * Im trying to display the county and flag in a list of users. I used the plugin
   Wp User Country by Adrian Lazariuc. It stores the information about country and
   displays the flag next to the name. Works fine in a custom authors page, but 
   in the amrusers list only shows the id of the country. I tried to create a pluggable
   function with no luck, some help would be really appreciated. The field found
   in amrusers is wpusercountry_id.
 *     ```
       <?php
          function ausers_format_wpusercountry_id(){
   
           $curauth = (isset($_GET['author_name'])) ? get_user_by('slug', $author_name) : get_userdata(intval($author));
   
           /*functions from the plugin (wp User Country) to display country name and flag*/
              <span class="country-name"><?php echo wpusercountry_img_display($curauth->ID);?><?php echo wpusercountry_name_display($curauth->ID);?></span>
       }
       ?>
       ```
   
 * [https://wordpress.org/plugins/amr-users/](https://wordpress.org/plugins/amr-users/)

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [anmari](https://wordpress.org/support/users/anmari/)
 * (@anmari)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/help-with-pluggable-function/#post-5797836)
 * I think you need to get someone with coding skills to help you.
    It will be more
   something like this:
 *     ```
       function ausers_format_wpusercountry_id($v, $u){
           $text = wpusercountry_img_display($u->ID).wpusercountry_name_display($u->ID);
       	return $text;
       }
       ```
   
 * assuming those functions return data – by the sounds of their names, they echo
   data so it will not work then.
    However I am not familiar with that plugin and
   how their functions work, so cannot help more than that.
 *  Thread Starter [Artus](https://wordpress.org/support/users/tintalent/)
 * (@tintalent)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/help-with-pluggable-function/#post-5797865)
 * Perfect! It worked just great! Thank you so much. It displays the name of the
   country and the flag. Im very happy.
 * Only thing is that the search function does not find the country by name, just
   by id. Is there something I can do to make it work? I know Iam asking too much.
 * Thank you again,
 *  Thread Starter [Artus](https://wordpress.org/support/users/tintalent/)
 * (@tintalent)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/help-with-pluggable-function/#post-5797964)
 * I used a custom field instead, and attached a css class to display the pic, the
   plugin finds the country with no problems.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Help with pluggable function’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/amr-users_f6f6f4.svg)
 * [amr users](https://wordpress.org/plugins/amr-users/)
 * [Support Threads](https://wordpress.org/support/plugin/amr-users/)
 * [Active Topics](https://wordpress.org/support/plugin/amr-users/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/amr-users/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/amr-users/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Artus](https://wordpress.org/support/users/tintalent/)
 * Last activity: [11 years, 3 months ago](https://wordpress.org/support/topic/help-with-pluggable-function/#post-5797964)
 * Status: resolved