Vivek Kotadiya
Forum Replies Created
-
Forum: Developing with WordPress
In reply to: Trying to make User Meta ShortcodeHi mightyx3n,
Hoe this will help you more.
/*-------------------------------------------------------------- [usermeta data="first_name,last_name"] = For specific fields [usermeta data="*"] or [usermeta] = For all fields -------------------------------------------------------------*/ function my_current_usermeta($atts) { $default = array( 'data' => '*', ); $fields = shortcode_atts($default, $atts); if ( is_user_logged_in() ) { $user_id = get_current_user_id(); $user_meta_data = array(); if($fields['data'] == '*'){ $userdata = get_user_meta($user_id); foreach($userdata as $user_meta_key => $user_meta_val){ if(is_serialized($user_meta_val[0])){ $user_meta_data[$user_meta_key] = unserialize($user_meta_val[0]); } else { $user_meta_data[$user_meta_key] = $user_meta_val[0]; } } } else { $fields = explode(',', $fields['data']); foreach($fields as $field){ $user_meta_data[$field] = get_user_meta($user_id, $field, true); } } return $user_meta_data; } else { return array(); } } add_shortcode('usermeta', 'my_current_usermeta');
Forum: Fixing WordPress
In reply to: How to change the website nameHi name1911434,
If you are asking for updating site name not reflecting in google search then it takes time you can use plugin mentioned.
But if you are asking that at your site you site name in not updating even after update it from setting then I can help here.
I see you used blocksy theme where it has settings to udpate site title here:
Apperience > Customiza > Header > Logo where you will find site title.