OZONE Asylum
Forums
CSS - DOM - XHTML - XML - XSL - XSLT
IE7 breaks image
This page's ID:
30148
Search
QuickChanges
Forums
FAQ
Archives
Register
Edit Post
Who can edit a post?
The poster and administrators may edit a post. The poster can only edit it for a short while after the initial post.
Your User Name:
Your Password:
Login Options:
Remember Me On This Computer
Your Text:
Insert Slimies »
Insert UBB Code »
Close
Last Tag
|
All Tags
UBB Help
The code for those functions is in the link-template.php file in the wp-includes directory. If you change the code for the next_post_link function from [code] function next_post_link($format='%link »', $link='%title', $in_same_cat = false, $excluded_categories = '') { $post = get_next_post($in_same_cat, $excluded_categories); if ( !$post ) return; $title = $post->post_title; if ( empty($post->post_title) ) $title = __('Next Post'); $title = apply_filters('the_title', $title, $post); $string = '<a href="'.get_permalink($post->ID).'">'; $link = str_replace('%title', $title, $link); $link = $string . $link . '</a>'; $format = str_replace('%link', $link, $format); echo $format; } [/code] to [code] function next_post_link($format='%link »', $link='%title', $in_same_cat = false, $excluded_categories = '',$wraptag='') { $post = get_next_post($in_same_cat, $excluded_categories); if ( !$post ) return; $title = $post->post_title; if ( empty($post->post_title) ) $title = __('Next Post'); $title = apply_filters('the_title', $title, $post); $string = '<a href="'.get_permalink($post->ID).'">'; $link = str_replace('%title', $title, $link); $link = $string . $link . '</a>'; $format = str_replace('%link', $link, $format); if($wraptag != '') { $format = "<$wraptag>$format</$wraptag>"; } echo $format; } [/code] Then instead of [code] <li><?php next_post_link('Previous') ?></li> [/code] You could use [code] <?php next_post_link('%link','Previous',true,'','li') ?> [/code] Use true above to make sure the links go to articles in the same category. [small](Edited by [url=http://www.ozoneasylum.com/user/3899]Nathus[/url] on 03-27-2008 21:17)[/small]
Loading...
Options:
Enable Slimies
Enable Linkwords
« Backwards
—
Onwards »