• Resolved astevens93

    (@astevens93)


    Hi, using the shortcode [current-show] displays the day, just before the time.
    I can see it’s the way the PHP date format is set, is there a way to change this without editing the functions file, as I’m conscious this will over-ride once I update the plugin.

    Cheers,

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Tony Zeoli

    (@tonyzeoli)

    You can use a child theme and add a function or filter to the functions.php file in the child theme and that will prevent anything from getting overwritten.

    Plugin Author Tony Zeoli

    (@tonyzeoli)

    Or you could use CSS to set the display: none!important rule to hide an element.

    Thread Starter astevens93

    (@astevens93)

    If anyone would like the solution to this, please make sure you have Radio Station 2.3.2 installed and use the following filter in your functions.php file.

    This will remove the Day from being shown in the widget for on air now, and upcoming DJ. Thanks to Tony Hayes for adding this filter.

    add_filter( 'radio_station_time_format_start', 'custom_time_format_start', 10, 3 );
    function custom_time_format_start( $format, $context, $args ) {
        if ( ( 'current-show' == $context ) || ( 'upcoming-shows' == $context ) ) {
            $format = 'g:i a'; 
        }
        return $format;
    }
Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Hide ‘Day’ in Current Show Shortcode/Widget’ is closed to new replies.