• Hey there,

    i am using the sugar calendar widget and everything works great. I just want to add the current month abobve the calendar. With this little PHP snippet i managed to do so but that obviously becomes nonesense, when you press the “NEXT” button to see whats going on the next months because these lines of code only display the actual current month not the month displayed after having clicked “NEXT”. Do any of you guys what i have to add to have the actual month displayed above every calendar month?

    <?php
    if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN')
        $localeCode = 'ge';
    else
        $localeCode = 'de_DE';
    
    setlocale(LC_TIME,$localeCode);
    
    echo strftime("%B");
    ?>

    https://wordpress.org/plugins/sugar-calendar-lite/

  • The topic ‘Showing current month above the widget?’ is closed to new replies.