WordPress.org

Ready to get started?Download WordPress

Forums

Permalinks not linking correctly (5 posts)

  1. Sikwondo
    Member
    Posted 6 years ago #

    Hi Peeps

    I have set up a blog here on a site I am redesigning... http://www.moments.org.uk/blog/

    I have created a specific category to use as a news section and am only pulling in blog articles from blog categories using:

    <?php query_posts('cat=1,3,4&showposts=5'); ?>

    However, when I click the links on the individual blog posts on the index page to take me to the articles page, they are not displaying the corresponding article... for example:

    http://www.moments.org.uk/blog/ ... clicking "Your Day Your Way - Inspirational Weddings" links to the news article "Marvelous Midge" (http://www.moments.org.uk/blog/?p=5)

    I am also having a problem with the permalinks, and have tried displaying a custom permalink structure:

    /%post_id%/%post_name%

    But ... on saving this, clicking an article leads me to the internally, rewritten URL but is a Not Found 404 error page so I have reverted it.

    Sorry, two problems there, but am really struggling to figure it out.

  2. Samuel Wood (Otto)
    Tech Ninja
    Posted 6 years ago #

    <?php query_posts('cat=1,3,4&showposts=5'); ?>

    Where exactly is this code at? What file in the theme? What is the content of the single.php file?

    Basically, we need to know what queries you are doing where.

  3. Sikwondo
    Member
    Posted 6 years ago #

    Why cant i pose more than a few lines of code??

  4. Sikwondo
    Member
    Posted 6 years ago #

    Index.php

    <div id="center_content">
    <?php query_posts('cat=1,3,4&showposts=5'); ?>

  5. Sikwondo
    Member
    Posted 6 years ago #

    Will post in seperate posts, that code is here in index.php in my own custom theme:
    <?php query_posts('cat=1,3,4&showposts=5'); ?>

Topic Closed

This topic has been closed to new replies.

About this Topic