Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thanks and it worked.
    but its only show unread count on page load, but if user receive any message this did’t update.
    the main purpose of this script is to display total number of unread messages and it should update via ajax means if user receive any message, it should show total total number of unread messages without reloading page.

    i have bellow code in function.php of my theme

    `<?php
    function addMessageRefresh()
    {
    ?>

    function getMessages(){
    jQuery(‘#user-messages span’).text(“Unread Messages: ()”);
    }
    setInterval(“getMessages()”, 10000);

    <?php
    }
    add_action( ‘wp_head’, ‘addMessageRefresh’);
    ?>`

    Thanks

    any help

    Thanks for replying
    then what is solution for that ?
    i mean i want to know does i am following the correct path or wrong?

    Thanks

Viewing 3 replies - 1 through 3 (of 3 total)
Skip to toolbar