Jump to content

Recommended Posts

Hello,

 

I have a file where I want to make the pagination visible right after the ending of the post. Right now it is showing after all modules/widgets but I want it above the facebook like so that the pagination is visible right away.

 

I tried a various modification with that code but couldn't find the right solution, so I would like your help. The code responsible for that is wp_link_pages (line 38) that is in the code listed below.

 

The preview of that is here: http://www.sedziapilkarski.pl/sedziowie-3/letni-turniej-pilkarski-sedziow/2252

 

<?php get_header(); ?>
<div id="container">

<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<div id="post-<?php the_ID(); ?>" <?php post_class('entry'); ?>>

<h1 class="entry_title"><?php the_title(); ?></h1>


<div class="metasingle">
<span class="postDate"><?php echo get_the_date('') ?> | </span>
<span class="postCategory"><?php _e('Filed under','linepress'); ?>: <?php the_category(','); echo get_the_term_list( $post->ID, 'gallery-cat', ': ', ' ', '' ); ?> | </span>
<span class="postAuthor"><?php _e('Posted by','linepress'); ?>: <?php the_author_posts_link(); ?></span>
</div><!-- /metas -->

<?php
// Theme innerpage slider
gab_innerslider();

// Display edit post link to site admin
edit_post_link(__('Edit This Post','linepress'),'<p>','</p>');	

// If there is a video, display it
gab_media(array( 'imgtag' => 1, 'link' => 1,
 'name' => 'gabfire',
 'enable_video' => 1,
 'video_id' => 'post',
 'catch_image' => 0,
 'enable_thumb' => 0,
 'media_width' => '623',
 'media_height' => '360',
 'thumb_align' => 'alignnone',
 'enable_default' => 0,
));

// Display content
the_content();

// Display pagination
wp_link_pages(array('before' => __('<strong>Strony:</strong> ', 'arras'),
'after' => '', 'next_or_number' => 'number'));

// make sure any floated content gets cleared
echo '<div class="clear"></div>';

//If there is a widget, display it
gab_dynamic_sidebar('PostWidget');

// Display edit post link to site admin
edit_post_link(__('Edit This Post','linepress'),'<p>','</p>');
?>


<?php if(of_get_option('of_ln_entry_meta') == 1) { ?>
<div id="entryMeta">
 <?php echo get_avatar( get_the_author_email(), '27' ); ?>
 <?php _e('Posted by','linepress'); ?> <?php the_author_posts_link(); ?>
 <?php /* This is commented, because it requires a little adjusting sometimes.
 You'll need to download this plugin, and follow the instructions:
 http://binarybonsai.com/archives/2004/08/17/time-since-plugin/ */
 /* $entry_datetime = abs(strtotime($post->post_date) - (60*120)); echo time_since($entry_datetime); echo ' ago'; */ ?>
 <?php _e('on','linepress'); ?> <?php echo get_the_date(''); ?>. <?php _e('Filed under','linepress'); ?> <?php the_category(', ') ?>.
 <?php _e('You can follow any responses to this entry through the','linepress'); ?> <?php comments_rss_link('RSS 2.0'); ?>.
 <?php if (('open' == $post-> comment_status) && ('open' == $post->ping_status)) {
 // Both Comments and Pings are open ?>
 <?php _e('You can leave a response or trackback to this entry','linepress'); ?>
 <?php } elseif (!('open' == $post-> comment_status) && ('open' == $post->ping_status)) {
 // Only Pings are Open ?>
 <?php _e('Responses are currently closed, but you can trackback from your own site.','linepress'); ?>
 <?php } elseif (('open' == $post-> comment_status) && !('open' == $post->ping_status)) {
 // Comments are open, Pings are not ?>
 <?php _e('You can skip to the end and leave a response. Pinging is currently not allowed.','linepress'); ?>
 <?php } elseif (!('open' == $post-> comment_status) && !('open' == $post->ping_status)) {
 // Neither Comments, nor Pings are open ?>
 <?php _e('Both comments and pings are currently closed.','linepress'); ?>
 <?php } ?>
 <div class="clear"></div>
</div>
<?php } ?>

</div><!-- /post -->
<?php endwhile; else : endif; ?>

<?php if ( of_get_option('of_ln_singlepage') <> "" ) { ?>
<div class="single_ad">
 <?php
 if(file_exists(TEMPLATEPATH . '/ads/single_468x60/'.current_catID().'.php') && (is_single() || is_category())) {
 include_once(TEMPLATEPATH . '/ads/single_468x60/'.current_catID().'.php');
 }
 else {
 include_once(TEMPLATEPATH . '/ads/single_468x60.php');
 }
 ?>
</div>
<?php } ?>


<?php comments_template(); ?>
</div><!-- /container -->


<div id="sidebar">
<?php get_sidebar(); ?>
</div><!-- End of sidebar -->


<div class="clear"></div>


<?php get_footer(); ?>

Link to comment
https://forums.phpfreaks.com/topic/272378-pagination-position/
Share on other sites

It looks like your Facebook link and Related Posts are being generated inside the_content(). I am assuming the structure is layed out in a way that expects more than one post per page since the related content wouldn't make sense if it was after ALL of the posts on that page. Incidently, if you have multiple posts on one page, the pagination wouldn't make sense above each Related Posts section. You might have to make a decision about what content you actually want to be dynamic and go from there.

 

One solution may be to prevent the_content() from outputting the Facebook and Related links, but then manually call them on this template page AFTER your pagination.

Link to comment
https://forums.phpfreaks.com/topic/272378-pagination-position/#findComment-1401354
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.