Forum Replies Created

Viewing 1 replies (of 1 total)
  • jsonberry

    (@jsonberry)

    I wanted to style the anchor tags being output by wp_get_archives that were to be displayed on my home.php page…

    Michael’s solution worked perfectly

    Thanks Michael!

    add_filter( 'get_archives_link', 'add_css_class_to_wp_get_archive_links'  );
    
    function add_css_class_to_wp_get_archive_links( $link ) {
      $link = str_replace( 'href', 'class="archive_link" href', $link );
      return $link;
    }
Viewing 1 replies (of 1 total)