PageNavigation on static page HELP
-
I am getting a hardtime solving on how to fix pagination on static page. whenever I click page 2, It doesnt make any change. I am new in wordpress and I dont have a knowledge in javascripting.
This is the code I am trying to change.
please help me thanks in advance
<?php
// Template Name: Portfolio Two Column
get_header(); ?><?php if (function_exists('progression_breadcrumbs')) progression_breadcrumbs(); ?>
<div class="content-container">
<div class="page-content">
<?php
if($post->post_parent) {
$children = wp_list_pages('sort_column=menu_order&title_li=&child_of=' . $post->post_parent . '&depth=1&echo=0');
}
else {
$children = wp_list_pages('sort_column=menu_order&title_li=&child_of=' . $post->ID . '&depth=1&echo=0');
}if ($children) { ?>
<ul class="sub-pagination">
<?php if($post->post_parent): ?>- post_parent); ?>'><?php echo get_the_title($post->post_parent); ?>
<?php else: ?>
<li class="current_page_item">ID); ?>'><?php echo get_the_title($post->ID); ?>
<?php endif; ?><?php echo $children; ?>
<?php } else { ?>
<?php } ?>
<?php while(have_posts()): the_post(); ?>
<h1 class="page-title"><?php the_title(); ?></h1>
<p class="page-description"><?php echo get_the_content(); ?></p>
<?php endwhile; ?><?php
$port_number_posts = of_get_option('portfolio_page_posts',24);
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
$portfolio_type = get_post_meta($post->ID, 'pyre_portfolio_type', true);
$args = array(
'posts_per_page' => $port_number_posts,
'post_type' => 'portfolio',
'paged' => $paged,
'tax_query' => array(
array(
'taxonomy' => 'p_type',
'field' => 'id',
'terms' => $portfolio_type
)
)
);$featured_posts = query_posts($args); //was get_posts before i thought of pagination
//print_r($featured_posts);
//print_r($wp_query);
//echo '
-- '.$wp_query->max_num_pages.'
';
if($featured_posts):
$postCount = 1;
foreach($featured_posts as $post):
?><div class="grid2column <?php
if($postCount % 2 == 0){ echo 'lastcolumn'; }
?>">
<div class="portfolio-list">
<div class="gallery-hover">
<?php if(of_get_option('display_portfolio_icons', 'yes') == 'yes'): ?>
<div class="icon-container">
<?php if(get_post_meta($post->ID, 'pyre_video_link', true)): ?>
ID, 'pyre_video_link', true); ?>" rel="prettyPhoto[gallery1]" title="" class="video-icon">Video
<?php elseif(has_post_thumbnail()): ?>
<?php $thumbnail = wp_get_attachment_image_src ( get_post_thumbnail_id($post->ID), 'full'); ?>
" rel="prettyPhoto[gallery1]" title="" class="photo-icon">Photo
<?php endif; ?><?php if(get_post_meta($post->ID, 'pyre_homepage_link', true)): ?>
ID, 'pyre_homepage_link', true); ?>" class="page-icon">Page
<?php else: ?>
" class="page-icon">Page
<?php endif; ?>
</div>
<?php endif; ?><?php
if(has_post_thumbnail()):
$thumbnail = wp_get_attachment_image_src ( get_post_thumbnail_id($post->ID),'portfolio-two');
$image = wp_get_attachment_image_src ( get_post_thumbnail_id($post->ID),'full');
?><?php if(get_post_meta($post->ID, 'pyre_homepage_link', true)): ?>
ID, 'pyre_homepage_link', true); ?>"><img src="<?php echo $thumbnail[0]; ?>" alt="<?php echo $post->post_title; ?>" />
<?php else: ?><?php if(of_get_option('portfolio_single_on', 'yes') == 'yes'): ?>
<?php if(get_post_meta($post->ID, 'pyre_video_link', true)): ?>
ID, 'pyre_video_link', true); ?>" rel="prettyPhoto[gallery1]" title=""><img src="<?php echo $thumbnail[0]; ?>" alt="<?php echo $post->post_title; ?>" />
<?php else: ?>
" rel="prettyPhoto[gallery1]" title="" ><img src="<?php echo $thumbnail[0]; ?>" alt="<?php echo $post->post_title; ?>" />
<?php endif; ?>
<?php else: ?>
"><img src="<?php echo $thumbnail[0]; ?>" alt="<?php echo $post->post_title; ?>" />
<?php endif; ?><?php endif; ?>
<?php
else:
?><?php if(get_post_meta(get_the_id(), 'pyre_video_embed_link_2', true)): ?>
<?php
$values = get_post_custom_values('pyre_video_embed_link_2');
$pattern = "/height="[0-9]*"/";
$values = preg_replace($pattern, "height='328'", $values);
$pattern = "/width="[0-9]*"/";
$values = preg_replace($pattern, "width='435'", $values);
$shortcode_output = do_shortcode($values[0]);
print $shortcode_output;
?><?php endif; ?>
<?php
endif;
?>
</div><?php if(of_get_option('display_portfolio_title_index', 'yes') == 'yes'): ?><h5>"><?php the_title(); ?></h5><?php endif; ?>
<?php if(of_get_option('display_portfolio_byline_index', 'yes') == 'yes'): ?><p><?php _e('by','progressionstudios'); ?> <?php the_author(); ?> <?php _e('on','progressionstudios'); ?> <?php the_time('F d, Y'); ?></p><?php endif; ?>
</div><!-- close .portfolio-list -->
</div><?php
if($postCount % 2 == 0){ echo '<div class="clearfix"></div>'; }$postCount++;
endforeach;
endif;
?></div><!-- close .page-content -->
<div class="clearfix"></div>
</div><!-- close .content-container -->
<div class="content-container-base-pagination"><div class="left-pagination"><?php
//get the current page number in $paged
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
$totalPages = $wp_query->max_num_pages;
if($totalPages>1):
?>
<?php _e('Page','progressionstudios'); ?> <?php echo $paged; ?> <?php _e('of','progressionstudios'); ?> <?php echo $totalPages; ?>
<?php endif; ?>
</div>
<div class="right-pagination"></div>
<div class="center-pagination"><?php kriesi_pagination($pages = '', $range = 2); ?> </div>
<!--div class="center-pagination">123Next ›</div-->
<div class="clearfix"></div></div><!-- close .content-container-base or .content-container-base-pagination -->
<?php get_footer(); ?>
-
The site you are asking about does not seem to be hosted on WordPress.COM so you need to make friends over at WordPress.ORG the keepers of the software you are using.
This site is for support of sites hosted on WordPress.COM. You should address your questions to WordPress.ORG the keepers of the software you are using: http://wordpress.org/support/
For more on the difference: http://support.wordpress.com/com-vs-org/
If you are asking for help with a WordPress.COM site then we need a link to that site to give you accurate help.
- The topic ‘PageNavigation on static page HELP’ is closed to new replies.