<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
FONT-SIZE: 10pt;
FONT-FAMILY:Tahoma
}
</style>
</head>
<body class='hmmessage'>
The theme I am using 'one-theme' looks nice but there is a major problem with it. When a user clicks the 'older' button, for listing older articles not displayed on the homepage, pagination, the next pages show up but you still have the same template file used for the older pages.<BR>
<BR>
In other words, you are still presented with the feature article and featured categories above the older articles. This really confused the readers because they think they are on the same page enless they scroll down the page.<BR>
<BR>
I need to modify in the code below to have wordpress change the template page for all the 'older' pages when the button is clicked.<BR>
<BR>
Just let me know how much you want and how long it will take.<BR>
<BR>
thank you<BR>
shawn <BR>
<A href="mailto:imtiedup@hotmail.com">imtiedup@hotmail.com</A><BR>
<BR>
--code<BR>
function ot_paginate() {<BR> <BR> // Some info<BR> global $paged;<BR> $on_page = intval($paged);<BR> $no_prev = false;<BR> $no_next = false;<BR> <BR> // Fix page<BR> if ($on_page == 0) {<BR> $on_page = 1;<BR> }<BR> <BR> // Get the max number of pages<BR> global $wp_the_query;<BR> $max_pages = $wp_the_query->max_num_pages;<BR> <BR> // Are we near the start?<BR> $start_pos = $on_page - 2;<BR> if ($start_pos <= 0) {<BR> $amt_from_zero = ($start_pos * $start_pos) + 1; // to account for 0<BR> $start_pos = 1;<BR> }<BR> <BR> // Are we near the end?<BR> $end_pos = $on_page + 2;<BR> if ($end_pos >= $max_pages) {<BR> $amt_from_end = $end_pos - $max_pages;<BR> $end_pos = $max_pages; <BR> }<BR> <BR> // How does this affect the range?<BR> if (isset( $amt_from_zero ) && isset( $amt_from_end )) {<BR> <BR> // Leave them both alone<BR> }<BR> elseif(isset( $amt_from_zero )) { // try and add the remainder on to the end_pos<BR> <BR> $end_pos = $end_pos + $amt_from_zero;<BR> <BR> if ($end_pos >= $max_pages) {<BR> $end_pos = $max_pages;<BR> }<BR> <BR> }<BR> elseif(isset( $amt_from_end )) { // try and subtract the remainder from the start_pos<BR> <BR> $start_pos = $start_pos - $amt_from_end;<BR> <BR> if ($start_pos <= 0) {<BR> $start_pos = 1;<BR> }<BR> <BR> }<BR> <BR> // Sort out next and prev<BR> if (($on_page - 1) <= 0) $no_prev = true;<BR> if (($on_page + 1) > $max_pages) $no_next = true;<BR> <BR> // How many pages do we have?<BR> $links_to_print = ($end_pos - $start_pos) + 1;<BR> <BR> // print the list<BR> echo '<div id="pagination">' . "\n";<BR> echo '<ul>' . "\n";<BR> echo '<li class="extreme"><a href="' . clean_url(get_pagenum_link(1)) . '">&laquo;</a></li>';<BR> echo $no_prev ? '<li class="inactive">' . ot_lang( 'newer' ) . '</li>' : '<li><a href="' . clean_url(get_pagenum_link($on_page - 1)) . '">' . ot_lang( 'newer' ) . '</a></li>';<BR> <BR> for ($i = $start_pos; $i <= $end_pos; $i++) {<BR> <BR> if ($i == $on_page) {<BR> echo '<li class="active">';<BR> } else {<BR> echo '<li>';<BR> }<BR> <BR> echo '<a href="' . clean_url(get_pagenum_link($i)) . '">' . $i . '</a></li>'; <BR> <BR> }<BR> <BR> echo $no_next ? '<li class="inactive">' . ot_lang( 'older' ) . '</li>' : '<li><a href="' . clean_url(get_pagenum_link($on_page + 1)) . '">' . ot_lang( 'older' ) . '</a></li>';<BR> echo '<li class="extreme"><a href="' . clean_url(get_pagenum_link($max_pages)) . '">&raquo;</a></li>';<BR> echo '</ul>' . "\n";<BR> echo '</div>' . "\n";<BR> <BR> }<BR><br /><hr />When your life is on the go—take your life with you. <a href='http://clk.atdmt.com/MRT/go/115298558/direct/01/' target='_new'>Try Windows Mobile® today</a></body>
</html>