Change Design of Pagination
-
[Sorry if this is the wrong place to ask, I couldn’t find a better one]
I know it a lot to ask but could someone help me with a short piece of code please? I never worked with PHP and would like to insert a bit of HTML into a piece pf PHP. I would really appreciate any help.
The Problem:
I have some not so web savvy users at my board and I’d like to make the pagination of threads better to see for them.
At the moment it’s kinda tiny and has no spaces between the page numbers for some strange reason.
(Screenshot of how it looks at my board: http://f.imagehost.org/0070/toosmall.png)
I guess I found the place to change it in the post-template.php
$output = '';
if ( $multipage ) {
if ( 'number' == $next_or_number ) {
$output .= $before;
for ( $i = 1; $i < ($numpages+1); $i = $i + 1 ) {
$j = str_replace('%',"$i",$pagelink);
$output .= ' ';
if ( ($i != $page) || ((!$more) && ($page==1)) ) {
if ( 1 == $i ) {
$output .= '<a href="' . get_permalink() . '">';
} else {
if ( '' == get_option('permalink_structure') || in_array($post->post_status, array('draft', 'pending')) )
$output .= '<a href="' . get_permalink() . '&page=' . $i . '">';
else
$output .= '<a href="' . trailingslashit(get_permalink()) . user_trailingslashit($i, 'single_paged') . '">';
}
}
$output .= $link_before;
$output .= $j;
$output .= $link_after;
if ( ($i != $page) || ((!$more) && ($page==1)) )
$output .= '</a>';
}
$output .= $after;
} else {
if ( $more ) {
$output .= $before;
$i = $page - 1;
if ( $i && $more ) {
if ( 1 == $i ) {
$output .= '<a href="' . get_permalink() . '">' . $link_before. $previouspagelink . $link_after . '</a>';
} else {
if ( '' == get_option('permalink_structure') || in_array($post->post_status, array('draft', 'pending')) )
$output .= '<a href="' . get_permalink() . '&page=' . $i . '">' . $link_before. $previouspagelink . $link_after . '</a>';
else
$output .= '<a href="' . trailingslashit(get_permalink()) . user_trailingslashit($i, 'single_paged') . '">' . $link_before. $previouspagelink . $link_after . '</a>';
}
}
$i = $page + 1;
if ( $i <= $numpages && $more ) {
if ( 1 == $i ) {
$output .= '<a href="' . get_permalink() . '">' . $link_before. $nextpagelink . $link_after . '</a>';
} else {
if ( '' == get_option('permalink_structure') || in_array($post->post_status, array('draft', 'pending')) )
$output .= '<a href="' . get_permalink() . '&page=' . $i . '">' . $link_before. $nextpagelink . $link_after . '</a>';
else
$output .= '<a href="' . trailingslashit(get_permalink()) . user_trailingslashit($i, 'single_paged') . '">' . $link_before. $nextpagelink . $link_after . '</a>';
}
}
$output .= $after;
}
}
}
if ( $echo )
echo $output;
return $output;
}And I would like to change the visual output to this
<p><strong> Next Page ></strong></p>
for “Next”
and
<p><strong>< Previous Page </strong></p>
for “Previous”
Thanks for your time
[and please excuse my poor English xD]
- You must be logged in to reply to this topic.