• In dark mode I need to change the title-image in my header.php to a different image.

    I can’t see how to add my action : add_action('darkmode','darkimage'); to the Night Eye dark mode switch when it is enabled and the corresponding reverse action: add_action('lightmode','lightimage'); when the switch is disabled.

    In my header.php I have:

    <?php do_action('darkmode'); ?><?php do_action('lightmode'); ?>

    my function call does this:

    function darkimage() {
    echo '<img src="https://www.menantol.co.uk/wp-content/themes/twentyeleven-child/Menantol_dark.png" alt="" />';
    }
    function lightimage() {
    echo '<img src="https://www.menantol.co.uk/wp-content/themes/twentyeleven-child/Menantol_light.png" alt="" />';
    }

    Please can you help me to add this functionality

    Thanks
    Paul

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘How can I add my actions to the Night Eye Switch’ is closed to new replies.