Advertisement
Guest User

Untitled

a guest
Apr 23rd, 2017
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. <?php wp_get_archives( array( 'type' => 'yearly', 'before' => '<li class="CAPS source-bold"><span class="plus">+</span> Trip ','after' => '</li>', 'format' => 'custom', ) ); ?>
  2.  
  3. <?php $linkstring = wp_get_archives(array('echo' => 0,'format'=>'custom','type'=>'yearly','before'=>'|'));
  4. $linkarray = explode('|',$linkstring);
  5. if ( get_option('permalink_structure') != '' ) {
  6. $pattern = '#/(dddd)/?[^>]+?>#';
  7. } else {
  8. $pattern = '/m=(dddd)[^>]+?>/';
  9. }
  10.  
  11. foreach ($linkarray as $onelink) {
  12. if (preg_match($pattern,$onelink,$matches)) {
  13. $mylink = 'Trip '.$onelink;
  14. $newlink = str_replace('>'.$matches[1], '><span class="plus">+</span> Trip '.$matches[1], $onelink);
  15. $output .= "<li class='$matches[1] archive-item' >$newlink</li>n";
  16. }
  17. }
  18.  
  19. echo $output; ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement