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:
parent
3534b698b5
commit
0ab49f608c
@ -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 ************************** */
|
/* * ************************* Posts Per Page Fix ************************** */
|
||||||
|
|
||||||
function gp_posts_per_page($query_string) {
|
function gp_posts_per_page($query_string) {
|
||||||
|
|||||||
@ -66,7 +66,7 @@ query_posts($args);
|
|||||||
?>
|
?>
|
||||||
|
|
||||||
<div id="content"<?php if($gp_settings['dropdown_filter'] == "0") { ?> class="shift-down"<?php } ?>>
|
<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'); ?>
|
<?php if (have_posts()) : while (have_posts()) : the_post(); include('loop-dedication-data.php'); ?>
|
||||||
<div <?php post_class('post-loop'); ?>>
|
<div <?php post_class('post-loop'); ?>>
|
||||||
<!--Begin Image-->
|
<!--Begin Image-->
|
||||||
@ -92,14 +92,14 @@ query_posts($args);
|
|||||||
<?php endwhile; ?>
|
<?php endwhile; ?>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
if($gp_settings['pagination'] == "0") {
|
if($gp_settings['pagination'] == "0") {
|
||||||
gp_pagination();
|
gp_ajax_pagination();
|
||||||
} else { ?>
|
} else { ?>
|
||||||
<div class="more-posts">
|
<div class="more-posts">
|
||||||
<?php
|
<?php
|
||||||
$category_id = get_cat_ID( DEDICATION_CATEGORY_SLUG );
|
$category_id = get_cat_ID( DEDICATION_CATEGORY_SLUG );
|
||||||
$category_link = get_category_link( $category_id );
|
$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'); ?> »</a>
|
<a href="<?php echo esc_url( $category_link ); ?>" class="read-more" title="<?php _e('See More', 'gp_lang'); ?>"><?php _e('See More', 'gp_lang'); ?> »</a>
|
||||||
</div>
|
</div>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|||||||
@ -5,8 +5,14 @@ jQuery(document).ready(function(){
|
|||||||
jQuery('.home-page .wp-pagenavi a').live('click', function(e){
|
jQuery('.home-page .wp-pagenavi a').live('click', function(e){
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
link = jQuery(this).attr('href');
|
link = jQuery(this).attr('href');
|
||||||
jQuery('#content').html('Loading...');
|
jQuery('.home-page .wp-pagenavi').remove();
|
||||||
jQuery('#content').load(link + ' #contentInner');
|
|
||||||
|
jQuery.get(link, function(data) {
|
||||||
|
var kids = jQuery(data).find('.contentInner').children();
|
||||||
|
jQuery.each(kids, function(){
|
||||||
|
jQuery('#content-wrapper #content .contentInner').append(jQuery(this));
|
||||||
|
});
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@ -1005,7 +1005,7 @@ h3.comments {
|
|||||||
padding-right: 34%;
|
padding-right: 34%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.more-comments a {
|
.more-comments a, a.read-more {
|
||||||
color: #f5b00c;
|
color: #f5b00c;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user