THIS THREAD HAS BEEN CLOSED.

How to increase the time display for a message

Updated on Aug 26, 2016 in FreelanceEngine
0 on Aug 26, 2016

As there have been some questions on how to increase the time display for a message , here’s a simple guide for you to easily achieve it.

 

In order to increase the time display for a message which is currently set as a bit more than 1 second, please kindly add this php code into child-theme/functions.php file.

 

add_action( 'wp_footer', 'cs_adjust_notify_time', 100 );
function cs_adjust_notify_time(){
    ?>
    <script type="text/javascript">
        (function($, Models, Collections, Views) {
            $(document).ready(function() {
                Views.Front.prototype.showNotice =  function(params) {
                    var view = this;
                    $('div.notification').remove();
                    var notification = $(view.noti_templates({
                        msg: params.msg,
                        type: params.notice_type
                    }));
                    if ($('#wpadminbar').length !== 0) {
                        notification.addClass('having-adminbar');
                    }
                    notification.hide().prependTo('body').fadeIn('fast').delay(5000).fadeOut(5000, function() {
                        $(this).remove();
                    });
                }
            });
         })(jQuery, window.AE.Models, window.AE.Collections, window.AE.Views);
    </script>
    <?php
}
 

 

The default number in line 18 is 1000. Just change to 5000.

 

Hope it helps!

  • Liked by
Loading more replies
Posting & Replying function will be deactivated from 3pm GMT+7 12th Sep.
Read More