• Resolved stephwitch

    (@stephwitch)


    Hi,

    we love your plugin, but are trying to only show the full year “2015” on the timeline. After having looked through your notes, we found this code but need some guidance as to where to place this code, which php file?

    ——————————-
    function custom_te_date_format( $date_format ) {
    $date_format = “M d , Y”; // will print the date as Nov 19 , 2014
    return $date_format;
    }
    add_filter( ‘timeline_express_custom_date_format’ , ‘custom_te_date_format’ , 10 );
    ——————————-

    Any help would be much appreciated, since we are not php developers, but designers.
    Thanks,
    Stephanie

    https://wordpress.org/plugins/timeline-express/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Evan Herman

    (@eherman24)

    Hi Stephanie,

    You’ll want to add that to your active theme (or better a child theme) function.php file.

    You’ll find the file inside of your theme root (wp-content/themes/theme-name/).

    Just add it as the last line towards the bottom of the file, save it and you should be good to go.

    If you’re looking to print just the Year, you’ll want to adjust the snippet to the following:

    function custom_te_date_format( $date_format ) {
      $date_format = "Y"; // will print the date as 2015
      return $date_format;
    }
    add_filter( 'timeline_express_custom_date_format' , 'custom_te_date_format' , 10 );

    Please let me know if that helps out at all!

    Thanks,
    Evan

    Great plugin!

    Is there a way to change the color of the date text that appears in the announcements? or to make it bold?

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Custom date’ is closed to new replies.