Display number next to Wishlist

Home Forums Legacy Support Support queries How-to & Troubleshooting Display number next to Wishlist

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #247107
    ART-Providers
    Participant
    Can we display the wishlist number on the profile menu like the notification message etc show So if there are 5 items in wishlist, it could display (5) next to it
    #247225
    Diana
    Participant
    @ART-Providers add_action('wplms_logged_in_top_menu','loggedin_login_panel'); function loggedin_login_panel($loggedin_menu){   global $current_user, $wpdb;   $count = $wpdb->get_var("SELECT count(*) FROM {$wpdb->postmeta} WHERE meta_key = 'wishlist_course'");   $loggedin_menu['custom']=array(          'icon' => 'icon-exclamation', // Grab icon code from here : yoursite.com/wp-content/themes/wplms/css/icons-reference.html          'label' => __('Wishlist'.($count),'vibe'),          'link' => 'http://yoursite.com/members/'.$current_user->user_login.'/profile/change-avatar/'   );   return $loggedin_menu; } Check this code and add in wp-admin > Plugins >Editor > Select WPLMS Customizer Plugin > wplms-cusstomizer.php  
    #247498
    ART-Providers
    Participant
    Thank you. Tried this but this did not seem to work. Could anything be wrong here
    #247666
    Diana
    Participant
    @ART-Providers, That's strange it was working on my localhost. Don't worry let me debug
    #247882
    ART-Providers
    Participant
    Thanks. Also, just to let you know, adding that code had messed up the course creation on our system so can you check that too. We have remove the code to fix it
    #247957
    Diana
    Participant
    @ART-Providers, I don't want to debug the code on your site diectly. Can you please share cpanel details. So that, I can safely debug the code P.S. mark your reply as private
    #247971
    ART-Providers
    Participant
    We do not have cpanel details. Do you mean FTP details?
    #248034
    Diana
    Participant
    @ART_providers, yes, please then share the FTP details if this corrected code will not work add_action('wplms_logged_in_top_menu','loggedin_login_panel');   function loggedin_login_panel($loggedin_menu){     global $wpdb;     $user_id = bp_displayed_user_id();   $count = $wpdb->get_var("SELECT count(*) FROM {$wpdb->usermeta} WHERE meta_key = 'wishlist_course' AND user_id = $user_id");     $loggedin_menu['custom']=array(            'icon' => 'icon-heart', // Grab icon code from here : yoursite.com/wp-content/themes/wplms/css/icons-reference.html            'label' => __('Wishlist'.($count),'vibe'),            'link' => 'http://yoursite.com/members/'.$current_user->user_login.'/profile/change-avatar/'     );     return $loggedin_menu;   } Here is the screenshot: http://prntscr.com/rpnbyv
Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘Display number next to Wishlist’ is closed to new replies.