Old 03-06-2008, 20:03   #1 (permalink)
bazzle
Senior Member
 
bazzle's Avatar
 
Join Date: Aug 2007
Location: Derby uk
Posts: 585
Send a message via MSN to bazzle
styling nav links in WordPress

I'm trying to do this on the pages navigation list on my wordpress site.

As it says, to make this work you need to wrap a span tag around the word.

But in WordPress, the nav list gets dynamically generated with this bit of PHP code.

Code:
<?php wp_list_pages('title_li='); ?>

..and so I can't access the markup for the list itself to put the spans in.


Does anyone know a way of doing this?
  Reply With Quote
Old 04-06-2008, 01:44   #2 (permalink)
esuntu
Member
 
esuntu's Avatar
 
Join Date: Jun 2008
Location: Latvia
Posts: 19
If You are using standalone Wordpress, then find the file classes.php and find the line #564:

PHP Code:
$output .= $indent '<li class="' $css_class '"><a href="' get_page_link($page->ID) . '" title="' attribute_escape(apply_filters('the_title'$page->post_title)) . '">' apply_filters('the_title'$page->post_title) . '</a>'

And wrap there what should be wrapped.
  Reply With Quote
Old 04-06-2008, 10:42   #3 (permalink)
bazzle
Senior Member
 
bazzle's Avatar
 
Join Date: Aug 2007
Location: Derby uk
Posts: 585
Send a message via MSN to bazzle
Cheers mate!
  Reply With Quote
Old 04-06-2008, 10:45   #4 (permalink)
pgo
Senior Member
 
Join Date: Jan 2005
Posts: 12,340
Of course, what happens when you update WP and overwrite that file?
  Reply With Quote
Old 04-06-2008, 10:47   #5 (permalink)
funkyprem
For all your goober needs
 
funkyprem's Avatar
 
Join Date: Dec 2004
Location: Coventry, UK
Posts: 1,531
if you do it in the files specifically in your particular themes' directory, it won't be an issue.
__________________
Time is really the only capital that any human being has, and the one thing that he can’t afford to lose. - Thomas Edison

prem ghinde
  Reply With Quote
Old 04-06-2008, 11:29   #6 (permalink)
pgo
Senior Member
 
Join Date: Jan 2005
Posts: 12,340
Don't listen to me, then. WordPress must have changed since I last used it.
  Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search


Contact Us - Web Design Forums - Archive - Top
Search Engine Optimization by vBSEO 3.0.0 RC8