Support » Fixing WordPress » link_before / link_after not working in WP 2.9.2

Viewing 6 replies - 1 through 6 (of 6 total)
  • I just found the same problem. At first I thougth it was my css code bug

    I’ve got a jQuery work around setup for now but this is really unfortunate. Here’s the code I’m using in my theme’s header.php in case it might help you:

    <script type="text/javascript">
    jQuery(document).ready(function() {
    	// bug fix :
    	// inserts span tag around the links in wp_list_pages
    	jQuery('div.inbar ul li a').contents().wrap('<span />');

    I thought I’d follow up here in case anyone else is having this issue… I narrowed the problem down to the Page Menu Editor plugin – disabling that fixes the issue.

    Commenting the line 770 of wp-includes/post-template.php:

    767 $output .= '</ul></li>';
    768 }
    770 //$output = apply_filters('wp_list_pages', $output, $r);
    772 if ( $r['echo'] )
    773 echo $output;
    774 else

    will make it work.

    thanks mindshare.

    the All In One SEO pack uses the same code as the Page Menu Editor so your jQuery was needed in my case (only slightly edited for my situation).

    I needed to add different elements before and after the link text:

    <script type="text/javascript">
    jQuery(document).ready(function() {
    	jQuery('div#nav ul li a').prepend('<span class="left"></span>');
    	jQuery('div#nav ul li a').append('<span class="right"></span>');

    I also made a post on the developers forum:


    Unfortunately I’ve never managed to get the pattern match needed to allow a before/after link option. If anyone has any suggestions I’m happy to add them as a collaborator on the plugin 🙂

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘link_before / link_after not working in WP 2.9.2’ is closed to new replies.