Ticket #945 -> En la página de inicio, no paginar y cargar las dedicatorias hacia abajo

git-svn-id: https://192.168.0.254/svn/Proyectos.ASong2U_Web/trunk@50 cd1a4ea2-8c7f-e448-aada-19d1fee9e1d6
This commit is contained in:
David Arranz 2012-07-30 16:21:31 +00:00
parent 3534b698b5
commit 0ab49f608c
4 changed files with 46 additions and 7 deletions

View File

@ -456,6 +456,39 @@ function gp_pagination($pages = '', $range = 2) {
}
}
function gp_ajax_pagination($pages = '', $range = 2) {
$showitems = ($range * 2) + 1;
global $paged;
if (get_query_var('paged')) {
$paged = get_query_var('paged');
} elseif (get_query_var('page')) {
$paged = get_query_var('page');
} else {
$paged = 1;
}
if ($pages == '') {
global $wp_query;
$pages = $wp_query->max_num_pages;
if (!$pages) {
$pages = 1;
}
}
if (1 != $pages) {
echo "<div class='wp-pagenavi'>";
if ($paged + 1 <= $pages) {
echo "<a href='" . get_pagenum_link($paged + 1) . "' class='read-more' title='". __('See More', 'gp_lang') . "'>" . __('See More', 'gp_lang') . "</a>";
}
echo "</div>\n";
}
}
/* * ************************* Posts Per Page Fix ************************** */
function gp_posts_per_page($query_string) {

View File

@ -66,7 +66,7 @@ query_posts($args);
?>
<div id="content"<?php if($gp_settings['dropdown_filter'] == "0") { ?> class="shift-down"<?php } ?>>
<div id="contentInner">
<div class="contentInner">
<?php if (have_posts()) : while (have_posts()) : the_post(); include('loop-dedication-data.php'); ?>
<div <?php post_class('post-loop'); ?>>
<!--Begin Image-->
@ -92,14 +92,14 @@ query_posts($args);
<?php endwhile; ?>
<?php
if($gp_settings['pagination'] == "0") {
gp_pagination();
if($gp_settings['pagination'] == "0") {
gp_ajax_pagination();
} else { ?>
<div class="more-posts">
<?php
$category_id = get_cat_ID( DEDICATION_CATEGORY_SLUG );
$category_link = get_category_link( $category_id );
?>
?>
<a href="<?php echo esc_url( $category_link ); ?>" class="read-more" title="<?php _e('See More', 'gp_lang'); ?>"><?php _e('See More', 'gp_lang'); ?> &raquo;</a>
</div>
<?php } ?>

View File

@ -5,8 +5,14 @@ jQuery(document).ready(function(){
jQuery('.home-page .wp-pagenavi a').live('click', function(e){
e.preventDefault();
link = jQuery(this).attr('href');
jQuery('#content').html('Loading...');
jQuery('#content').load(link + ' #contentInner');
jQuery('.home-page .wp-pagenavi').remove();
jQuery.get(link, function(data) {
var kids = jQuery(data).find('.contentInner').children();
jQuery.each(kids, function(){
jQuery('#content-wrapper #content .contentInner').append(jQuery(this));
});
});
});
});

View File

@ -1005,7 +1005,7 @@ h3.comments {
padding-right: 34%;
}
.more-comments a {
.more-comments a, a.read-more {
color: #f5b00c;
font-size: 14px;
font-weight: bold;