Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4546740
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T15:59:46+00:00 2026-05-21T15:59:46+00:00

My Original question was this: I have a wordpress installation where the Home page

  • 0

My Original question was this:

I have a wordpress installation where
the Home page is set to display post
from a specific category. To achieve
this, I created a template “home.php”
and put the following code:

query_posts( 'cat=4&order=desc' );

When I visit the site’s home page, it
display posts from the category but
the Navigation does not work? I have
permalink structure set
“/%category%/%postname%/”

Please let me know if I am doing
something wrong.

Update:
Now, I have solved this using this code:

$paged = (get_query_var('page')) ? get_query_var('page') : 1;
    $args = array (
        'cat' => 4,
        'orderby' => 'date',
        'order' => 'desc',
        'posts_per_page' => '10'
        );
    query_posts($args . '&paged=' . $paged);

Now the problem is that first time, it displays everything fine but if you visit any other archive page, it start displaying posts from other categories. For example, the above code displays posts from Cat=>3 as well. And on page, where I want to display posts from Category = 3, it display posts from category 4 as well.

Please help…

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T15:59:46+00:00Added an answer on May 21, 2026 at 3:59 pm

    What do you mean by “Navigation”? What code are you using for the navigation? Are you limiting the amount of posts?
    If you have problems with the pagination. You can use this:

    <?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; 
            query_posts("cat=4&order=desc&paged=$paged"); ?>
    

    Please, Clarify your problems to help you.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Original Question I have this situation: type X1 = Class protected oMyList: TMyList; public
Original Question mysql-server-6.0.10 I have this problem, I'm using the COMPRESS function to update
this is a re-post of my original question that I asked on the yesod
Editor Note: original title of this Question - Wordpress Template Changes Based on Template
Original Question This is the Git repository that I have at the moment, which
I left this question as generic as possible, but I do have a specific
This is a simple concept question... If I have a wordpress plugin and I
This question is sort of a follow-up to my original question here . Let's
This question relates to my answer of another of my question. The original question
This is a continuation of this question: Original Question (SO) The answer to this

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.