WordPress.org

Support

Support » How-To and Troubleshooting » [Resolved] link_before / link_after not working in WP 2.9.2

[Resolved] 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 : http://wordpress.org/support/topic/365260
    	// inserts span tag around the links in wp_list_pages
    	jQuery('div.inbar ul li a').contents().wrap('<span />');
    });
    </script>

    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.

    http://wordpress.org/extend/plugins/page-menu-editor

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

    767 $output .= '</ul></li>';
    768 }
    769
    770 //$output = apply_filters('wp_list_pages', $output, $r);
    771
    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>');
    });
    </script>

    I also made a post on the developers forum:

    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 ‘[Resolved] link_before / link_after not working in WP 2.9.2’ is closed to new replies.