i use this function

wp_get_archives( array( 'type' => 'yearly', 'limit' => 12, 'format' => 'html' ) );

And i got this:

<a title="2013" href="http://wordpress11.localhost/?m=2013">2013</a>

I need only "2013". Just anyone know how to do this?

1 Answer 1


Totally trying this, how about:

wp_get_archives( array( 'type' => 'yearly', 'limit' => 12, 'format' => 'custom', 'before' => '<span class="year">', 'after' => '</span>' ) );

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.