Viewing 12 replies - 1 through 12 (of 12 total)
  • Thread Starter shtan

    (@shtan)

    https://i59.tinypic.com/33m4yg6.jpg sorry i think this image link is the correct one

    Plugin Author Shamim Hasan

    (@shamim51)

    Add following code in your theme’s functions.php

    add_shortcode('fep_new_message_count_shortcode', 'fep_get_new_message_button' );
    add_filter('wp_nav_menu_items', 'do_shortcode');

    Now use this shortcode in your menu. Eg. Create a custom menu ( Links ) add link of your message page and Link Text Message[fep_new_message_count_shortcode]

    I don’t know if it is a good idea to execute shortcode in menu (i don’t think so ). I will try to find a better way to do this. May be in next release of this plugin. Make sure to delete this code if i find a better way.

    Thread Starter shtan

    (@shtan)

    Hi, thank you for your fast reply! I’ve added the code in my theme’s functions.php.

    However, for my menu list, there’s an exisiting <?php so i’m not sure how do i add a shortcode in it. Sorry to trouble you.

    <?php
     echo '<li><a href="/private-message" title="'. __('Private Message ','framework') .'">'. __('Private Message','framework').'</a></li>';
    ?>

    Thank you!

    Plugin Author Shamim Hasan

    (@shamim51)

    Remove those code from functions.php as you already executing php.
    Try this

    <?php
     echo '<li><a href="/private-message" title="'. __('Private Message','framework') .'">'. sprintf(__('Private Message%s','framework'), fep_get_new_message_button()).'</a></li>';
    ?>

    Let me know if this works.

    If you find this plugin helpful you can write a review.
    Thanks

    Thread Starter shtan

    (@shtan)

    Hi, I’ve followed your instruction. It doesn’t work, there’s no number shown beside the word ‘private message’.

    Plugin Author Shamim Hasan

    (@shamim51)

    It will show only when you have unread message in messagebox.

    Thread Starter shtan

    (@shtan)

    I’ve started a conversation between 2 users but it didn’t show. Is it better for me to share my WP credentials with you so you can take a look?

    Plugin Author Shamim Hasan

    (@shamim51)

    Plugin Author Shamim Hasan

    (@shamim51)

    To whom i will send message so that you can check?
    send your login also.

    Plugin Author Shamim Hasan

    (@shamim51)

    now working perfectly.

    Check and confirm

    Thread Starter shtan

    (@shtan)

    Perfect!! Thank you so much!

    Hi Shamim,

    I am also looking to do the same thing with my site – show messages that are in box from menu.

    I see this was a private message, can you please help with this as function.php does not work.

    Thank you ??

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Display no. of new message on header drop down list’ is closed to new replies.