Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #408033

    Hi

    I have my Blog Archives showing on the Archives page (url http://176.32.230.26/pacerehab.com/?page_id=3500) as:

    March 2015
    January 2015
    March 2013
    March 2012
    March 2011

    I want to remove the MONTH so it just shows as the year ie:
    2015
    2013
    2011 etc.

    The dates also appear in my sidebar widget, so again I would like just the year to appear in the sidebar.

    Many thanks in advance

    Dan

    #408047

    Hi sjidesign!

    Thank you for coming back.

    In functions.php try to put the following:

    
    function my_limit_archives( $args ) {
        $args['type'] = 'yearly';
        return $args;
    }
    
    add_filter( 'widget_archives_args', 'my_limit_archives' );
    add_filter( 'widget_archives_dropdown_args', 'my_limit_archives' );
    

    Best regards,
    Günter

    #408103

    Hi Gunter

    Many thanks, code worked perfectly.

    Regards

    Dan

    #408157

    Hi!

    Glad I could help you. Enjoy the theme.

    Cheers!
    Günter

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Remove Month from Archives’ is closed to new replies.