I’ve searched all over for a fix and have had no luck. Im using the “User Meta Shortcodes” plugin to display user meta. The plugin works fine, the problem is that it doesnt output the meta info from the site/blog owner, it only outputs the meta of the super admin. Im assuming that the “get” function that is being used in the plugin is only for single install not multisite install. PLEASE HELP!

Also the user_meta that is being return only show up when someone is logged in but I would like it to show publically on each site in my network uniquely based upon site/blog owner. I am very new to php, so ANY assitance willl be greatly appreciated. Thanks!

here is the code for the plugin:

      function userInfoSc ( $attributes, $content=null ) {    
extract(shortcode_atts(array(
    "field" => null, "if" => null, "nospan"=>false, "size"=>32, $default=>""
), $attributes));
//use {{empty}} instead of nothing inside the shortcode
if('{{empty}}'==$content) $content="";
global $user_info, $user_ID;
get_currentuserinfo();
$user_info = get_userdata($user_ID);
//if we have a test, we print the content in case the test is true. otherwise we print the field value concatenated with the content of the shortcode
if (isset($if) && $field != "avatar") {
    if ( $if == $user_info->$field ) return do_shortcode($content);
}
else {
    if ( is_user_logged_in() ) {
        if( $field != "avatar" ) {
            if ($nospan)
                return $user_info->$field . do_shortcode($content);
            else
                return "<span class="userinfo">" . $user_info->$field . do_shortcode($content) . "</span>";
        }
        else  {
            return get_avatar( $user_info->id, $size, $default, $user_info->first_name . " " . $user_info->last_name );
        }
    }
}
//return empty string in case we arrive here
return "";

}

add_shortcode(‘userinfo’,’userInfoSc’);

Read more here: Get site owner meta to show publically on front end in multisite? using "user meta shortcodes" plugin


Solution:

If you know the solution of this issue, please leave us a reply in Comment section, to update the question.

Related Wordpress search:

, , , , , , , , ,

Wordpress related questions and answers: