• Resolved kevinb623

    (@kevinb623)


    Is there a way to change or disable the sound that occurs when a browser presents a notification?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Same q please

    Plugin Author websupporter

    (@websupporter)

    Ah sorry, I’ve missed this question. Strange, I should get notifications though. Anyway, there is a filter for this: dn_mp3_url

    So with

    add_filter( 'dn_mp3_url', 'change_notification_sound' );
    change_notification_sound( $mp3_url ) {
        return 'https://example.com/other-sound.mp3';
    }

    you should be able to change the sound file.

    I hope this helps,
    David.

    Hello Author,

    I’m not a tech guy and i’m just starting learning wordpress.

    Where to add this code? I need your help on this please. Sorry to bother you.

    Thank you.

    Plugin Author websupporter

    (@websupporter)

    Hi renardv,
    no problem. You will find in your theme files a functions.php. This would be an appropriate place. For example, if your theme is twentysixteen, you will find the file here:
    wp-content/themes/twentysixteen/functions.php

    > i’m just starting learning wordpress.
    If you want to do such changes, it would be a good idea to use a child theme, so you can keep updating the theme without loosing such changes. More information about child themes: https://codex.www.ads-software.com/Child_Themes

    I hope, this helps ??

    David.

    Hello, @websupporter. Thanks for making this theme. It is working well.

    However, I, too, would like to disable the sound for the desktop notification.

    I tried adding the following code to my theme’s functions.php:

    add_filter( 'dn_mp3_url', 'change_notification_sound' );
    change_notification_sound( $mp3_url ) {
        return '';
    }

    and

    add_filter( 'dn_mp3_url', 'change_notification_sound' );
    change_notification_sound( $mp3_url ) {
        return NULL;
    }

    However, both of those completely broke the site. I had to go in my FTP and delete that from the file.

    What might I be doing wrong, and what would you recommend I do to disable the sound for my desktop notifications?

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Change / remove Sound’ is closed to new replies.