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

  • SEARCH
  • Home
  • 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 8809687
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T02:56:19+00:00 2026-06-14T02:56:19+00:00

Hi Im trying to make my first wordpress website. i have been trying to

  • 0

Hi Im trying to make my first wordpress website. i have been trying to bring bat posts from two different categories and display them on the same page. I have it bring the posts back but it keeps putting them in a random order. im wanting a with posts from one categorie and a underneath with posts from another category.

heres what i have got so far

<?php get_head(); ?>

<div id="container">
<?php get_header(); ?>
<?php get_banner(); ?>

    <div class=" center content" role="main">
      <div id="posts">


          <div class="news">
                <?php query_posts('catname=news&showposts=3'); while (have_posts()) : the_post(); the_title(); the_content(); 
                endwhile;?>

                <div class="clear"></div>
          </div>
             <div class="msghead">
            <?php query_posts('catname=msghead&showposts=1'); while (have_posts()) : the_post(); the_title(); the_content(); 
            endwhile;?>

           </div>
        </div>
    </div>

    <div class="sidebardiv">
       <?php get_sidebar(); ?>
    <div class="clear">
    </div>
</div>
</div>
<?php get_footer(); ?>

</div>
  • 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-06-14T02:56:20+00:00Added an answer on June 14, 2026 at 2:56 am

    Have you tried the order and orderby query parameters?

    http://codex.wordpress.org/Class_Reference/WP_Query#Order_.26_Orderby_Parameters

    Your code might go something like this which orders by date, descending:

    <?php query_posts('cat=news&showposts=3&orderby=date'); while (have_posts()) : the_post(); the_title(); the_content(); 
    endwhile;?>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to make my first public .net website but I have a
I am trying to make two .exe files in c where first one store
I'm trying to make local development copies for my wordpress blog. I tried first
I'm trying to make my first game, a console tetris. I have a class
Hi I'm trying to write my first Wordpress plugin. I'm using classes to make
I'm trying to make my first jQuery slider, and I have this code: $(#str).keyup(function(event)
I am trying to make my first program in vb.net 2010, and I have
I trying to make my first AJAX with JSON call using jQuery and CodeIgniter.
I'm trying to make my first app for Microsoft Surface. I need to use
I am trying to make my first app using XNA, and I am having

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.