Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

Blogging Forum


You are currently viewing our Blogging Forum as a guest. Please register to participate.
Login



Reply
My Previous/next page link not woorking, in wordpress.
Old 12-26-2009, 07:51 PM My Previous/next page link not woorking, in wordpress.
Average Talker

Posts: 22
Name: Edwin Teguh N
Trades: 0
Would you help me because I'm very confused.
I'm newbie, in try to use wordpress to build new site.
but my previous/next page link not working and not send me anywhere.
This code from archive.php and search.php
<?php posts_nav_link(' — ', __('« Previous Page'), __('Next Page »')); ?>
But at my index.php, no have this code.
When I try to put this code to my index.php, this previous/next link not send me anywhere. I dont know how to solve this trouble.
Would you help me?
Below is my full index.php
PHP Code:
 <?php
get_header
();
?>
 <?php include (TEMPLATEPATH "/frame.php"); ?>
 <div id="content-big">
 <?php $count 0;?>
        <?php query_posts('showposts=15'); ?>
    <?php if (have_posts()) : ?>
 <?php while (have_posts()) : the_post(); ?>
 <div class="postindex" id="post-<?php the_ID(); ?>">
 <h2>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></h2>
 <div class="entry">
 <?php the_excerpt(__('Readmore �'));?>
 </div>
<div class="spacer"></div>
    <ul class="post-data">
    <li class="comments">
<?php comments_popup_link('No Comments »''1 Comment »''% Comments »'); ?>
     <li class="posted">
<?php the_time('F jS, Y'?> by <?php the_author() ?> <?php edit_post_link('Edit','',''); ?> 
 </div>
 <?php comments_template(); ?>
 <?php endwhile; else: ?>
<p><?php _e('Sorry, no posts matched your criteria.'); ?></p>
<?php endif; ?>
 <?php posts_nav_link(' — '__('« Previous Page'), __('Next Page »')); ?>
 <?php get_footer(); ?>
Thank you very much for your advance.
Regards
Edwin

Last edited by chrishirst; 12-27-2009 at 05:31 AM..
edwinteguhn is offline
Reply With Quote
View Public Profile Visit edwinteguhn's homepage!
 
 
Register now for full access!
Old 12-31-2009, 01:51 PM Re: My Previous/next page link not woorking, in wordpress.
racer x's Avatar
Ultra Talker

Posts: 457
Name: Randy
Location: Northern Wisconsin
Trades: 0
Before you dig into the code, check your settings in the admin area. Settings -> Reading -> Blog pages show at most. This number has to be less than the total number of posts you have in order for paging to work.

If this is a new blog, you may not have more than 10 posts yet, therefore, the previous-next links wouldn't go anywhere.

Further reading:
http://digwp.com/2009/08/wordpress-page-navigation/

Also, when using query_posts you need to add before the query:
PHP Code:
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1
This will allow paging to work.

Last edited by racer x; 12-31-2009 at 01:54 PM..
racer x is offline
Reply With Quote
View Public Profile Visit racer x's homepage!
 
Reply     « Reply to My Previous/next page link not woorking, in wordpress.
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.21274 seconds with 12 queries