Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php wp_get_archives( array( 'type' => 'yearly', 'before' => '<li class="CAPS source-bold"><span class="plus">+</span> Trip ','after' => '</li>', 'format' => 'custom', ) ); ?>
- <?php $linkstring = wp_get_archives(array('echo' => 0,'format'=>'custom','type'=>'yearly','before'=>'|'));
- $linkarray = explode('|',$linkstring);
- if ( get_option('permalink_structure') != '' ) {
- $pattern = '#/(dddd)/?[^>]+?>#';
- } else {
- $pattern = '/m=(dddd)[^>]+?>/';
- }
- foreach ($linkarray as $onelink) {
- if (preg_match($pattern,$onelink,$matches)) {
- $mylink = 'Trip '.$onelink;
- $newlink = str_replace('>'.$matches[1], '><span class="plus">+</span> Trip '.$matches[1], $onelink);
- $output .= "<li class='$matches[1] archive-item' >$newlink</li>n";
- }
- }
- echo $output; ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement