WordPress.org

Ready to get started?Download WordPress

Forums

Older entries not working and url problem (6 posts)

  1. Linosa
    Member
    Posted 5 years ago #

    This is the first time I try to build a site in wordpress. I have two (right now, hehe) issuses that I can't find the solution of.

    1. Older entries is not working on my newspage. Here's news template:

    <?php
    /*
    Template Name: Nyheter
    */
    ?>
    <?php get_header(); ?>
    <div id="bg_alexandra" style="height:490px;">
    
    <div id="index_content">
    <div id="page_content">
    <?php if (have_posts()) : ?>
    
    <?php while (have_posts()) : the_post(); ?>
    <div class="single" id="post-<?php the_ID(); ?>"></div>
    <?php the_content('Read the rest of this entry &raquo;'); ?>
    <div class="clear"></div>
    <?php endwhile; endif; ?>
    
    <br />        
    
    	<?php if (have_posts()) : ?>
    <?php query_posts('category_name=nyheter&showposts=2'); ?>
    <?php while (have_posts()) : the_post(); ?>
    <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h2>
    <span class="datum"><?php the_time('Y-m-d, G:i'); ?></span>
    <?php the_content('Read the rest of this entry &raquo;'); ?>
    <br />
    <?php endwhile;?> 
    
    		<div class="navigation">
    			<div class="alignleft"><?php next_posts_link('&laquo; Older Entries') ?></div>
    			<div class="alignright"><?php previous_posts_link('Newer Entries &raquo;') ?></div>
    		</div>
    
    	<?php else : ?>
    
    		<h2 class="center">Not Found</h2>
    		<p class="center">Sorry, but you are looking for something that isn't here.</p>
    		<?php get_search_form(); ?>
    
    	<?php endif; ?>
    
     <div class="clear"></div>
    </div>
    </div>
    </div>
    <div class="clear"></div>
    <?php get_footer(); ?>

    2. I can't change my theme so the url is written as text insted of id-numbers. It only says "page cannot be found". Any suggestions?

  2. Linosa
    Member
    Posted 5 years ago #

    I got the permalinks to work!

  3. BTAO
    Member
    Posted 5 years ago #

    do you know how to repair the broken links within archives and the paginator "older entries? I had to do a reinstall and cannot identify how to repair these ...they are throwing an internal error.

  4. Linosa
    Member
    Posted 5 years ago #

    No, I dunno why they ain't working. Is there anyone who does?

  5. Linosa
    Member
    Posted 5 years ago #

    I've tried everything now, but I don't understand what possibly can be wrong. Any ideas?

  6. alvarix
    Member
    Posted 4 years ago #

    I just spent some time finding the solution, so I thought I would update the open questions I found on this topic.

    See codex:
    Pagination Parameters.

Topic Closed

This topic has been closed to new replies.

About this Topic