Forums

[resolved] Next Page Link doesn't exists (11 posts)

  1. accessko
    Member
    Posted 2 years ago #

    Hi,
    I have a problem with the Next Page link, when I press the link, WordPress send me to this URL: http://www.accessko.nl/weblog/page/2
    But this page doesn't exists.
    When I put this link in the URL:
    http://www.accessko.nl/weblog/index.php/page/2
    Everything is just fine.

    How can I add the second URL (the index.php) to the Next/Previous link?

    Thanks in advance for your help!

  2. ryans149
    Member
    Posted 2 years ago #

    what is your permalink structure??

  3. accessko
    Member
    Posted 2 years ago #

    /index.php/%year%/%monthnum%/%day%/%postname%/

  4. ryans149
    Member
    Posted 2 years ago #

    It should take automatically.. there seems to be some error in your theme's index page. Check this code in theme's index.php:

    http://codex.wordpress.org/Styling_Page-Links

  5. accessko
    Member
    Posted 2 years ago #

    Do I have to add the <?php wp_link_pages(); ?> code in my index.php file to fix this?

  6. ryans149
    Member
    Posted 2 years ago #

    may be.. need to check your index.php file..

    may be it is already there.. and you just need to edit it

    can you show us the code?

  7. accessko
    Member
    Posted 2 years ago #

    Thx for the help. The code of the index.php file is:

    ?php get_header(); ?>
    <div id="contents" class="clearfix">

    <div id="left_col">
    <?php $options = get_option('mc_options'); ?>
    <?php $odd_or_even = 'odd'; ?>
    <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>

    <div class="post_<?php echo $odd_or_even; ?>">
    <div class="post clearfix">
    <div class="post_content_wrapper">
    <h2>"><?php the_title(); ?></h2>
    <div class="post_content">
    <?php the_content(__('Lees verder', 'monochrome')); ?>
    </div>
    </div>
    <dl class="post_meta">
    <dt class="meta_date"><?php the_time('Y') ?></dt>
    <dd class="post_date"><?php the_time('d') ?><span>/<?php the_time('m') ?></span></dd>
    <?php if ($options['author']) : ?>
    <dt><?php _e('POSTED BY','monochrome'); ?></dt>
    <dd><?php the_author_posts_link(); ?></dd>
    <?php endif; ?>
    <dt><?php _e('CATEGORY','monochrome'); ?></dt>
    <dd><?php the_category('
    '); ?></dd>
    <?php if ($options['tag']) : ?>
    <?php the_tags(__('<dt>TAGS</dt><dd>','monochrome'),'
    ','</dd>'); ?>
    <?php endif; ?>
    <dt class="meta_comment"><?php comments_popup_link(__('Plaats reactie', 'monochrome'), __('1 Reactie', 'monochrome'), __('% Reacties', 'monochrome')); ?></dt>
    <?php edit_post_link(__('[ EDIT ]', 'monochrome'), '<dd>', '</dd>' ); ?>
    </dl>
    </div>
    </div>

    <?php $odd_or_even = ('odd'==$odd_or_even) ? 'even' : 'odd'; ?>
    <?php endwhile; else: ?>
    <div class="post_odd">
    <div class="post clearfix">
    <div class="post_content_wrapper">
    <?php _e("Sorry, but you are looking for something that isn't here.","monochrome"); ?>
    </div>
    <div class="post_meta">
    </div>
    </div>
    </div>
    <?php endif; ?>

    <div class="content_noside">
    <?php include('navigation.php'); ?>
    </div>

    </div><!-- #left_col end -->

    <?php get_sidebar(); ?>

    </div><!-- #contents end -->

    <div id="footer">
    <?php get_footer(); ?>

  8. ryans149
    Member
    Posted 2 years ago #

    Everything is in navigation.php..

    when I check this file:

    http://www.accessko.nl/weblog/wp-content/themes/monochrome/navigation.php

    I get this:

    Fatal error: Call to undefined function get_pagenum_link() in C:\domains\accessko.nl\wwwroot\weblog\wp-content\themes\monochrome\navigation.php on line 4

    get_pagenum_link()

    I think I will need suggestion from other members.. :)

  9. accessko
    Member
    Posted 2 years ago #

    Does anybody got a suggestion what I have to do with get_pagenum_link()?
    As ryans149 said, I got an error an navigation.php on line 4.

    This is the code of the navigation.php:

    <?php
    
    global $wp_rewrite;
    $paginate_base = get_pagenum_link(1);
    if (strpos($paginate_base, '?') || ! $wp_rewrite->using_permalinks()) {
    	$paginate_format = '';
    	$paginate_base = add_query_arg('paged', '%#%');
    } else {
    	$paginate_format = (substr($paginate_base, -1 ,1) == '/' ? '' : '/') .
    	user_trailingslashit('page/%#%/', 'paged');;
    	$paginate_base .= '%_%';
    }
    
    echo '<div class="page_navi clearfix">'. "\n";
    echo paginate_links( array(
    	'base' => $paginate_base,
    	'format' => $paginate_format,
    	'total' => $wp_query->max_num_pages,
    	'mid_size' => 2,
    	'current' => ($paged ? $paged : 1),
            'type' => 'list',
            'prev_text' => '&laquo;',
            'next_text' => '&raquo;',
    ));
    echo "\n</div>\n";
    
    ?>
  10. accessko
    Member
    Posted 2 years ago #

    I've replaced the $paginate_base variable on line 4 into:
    $paginate_base = 'http://www.accessko.nl/weblog/index.php';

    It seems to work fine now. I hope that this was the solution.

  11. kangel
    Member
    Posted 2 years ago #

    accessko—Does your code look like this on line 4?
    if (strpos($paginate_base = 'http://www.momcultureonline.com/index.php') || ! $wp_rewrite->using_permalinks()) {

    This is the URL I'm working with...
    It doesn't seem to be working, and it adds an error message to my index page:
    "Warning: Wrong parameter count for strpos() in D:\Hosting\2284568\html\wp-content\themes\monochrome\navigation.php on line 5"

    Did you find any other solutions for this? I am also working in Monochrome.

Topic Closed

This topic has been closed to new replies.

About this Topic