Page slug as li id
-
Hi!
I’m probably just plain stupid and there may be a better way:
I hacked the 2.06 WP (template-functions-post.php) to get my page slugs (or id #) as css id’s. Now with 2.1 and new “walk” function code in classes.php, my head is spinning.
Does anyone have a bright idea of how to do it? What I want to do is (yes I know you shouldn’t) replace the page link list with images via css.Relevant hacked code (from 2.06 template-functions.php around line 420):
$tdude_page_slug = attribute_escape($cur_page['name']);
and a few lines down:
$output .= $indent . '<li class="' . $tdude_page_slug . '"><a href="' . get_page_link($page_id) . '" title="' . $title . '"><span>' . $title . '</span></a>';
Note: I know there is a Text replacement plugin. I want my link text warped, so the plugin is no option.
A last word: I want to thank all the contributors and writers of the documentation to this fantastic app! When I get better at it, I’d love to give something back.
- The topic ‘Page slug as li id’ is closed to new replies.