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 8191495
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T03:55:59+00:00 2026-06-07T03:55:59+00:00

I have a wordpress category archive for posts in the press category. Each category

  • 0

I have a wordpress category archive for posts in the “press” category. Each category post is currently sorted by the WordPress publish date. Right now each post also has a “Press Date” field which lets the user post a date in a month year format like “May 2012”

I would like to sort the posts based on this Press Date instead. Here is my current code:

<?php query_posts('showposts=10000&cat=3'); if ( have_posts() ) : ?>
    <?php while ( have_posts() ) : the_post(); ?>
        <? $count = $count + 1; $clear = $count % 6; ?>
        <a <? post_class("press-block"); ?> href="<? echo get('link');?>" target="_blank">
            <? echo get_image ('press_image')  ?>
            <span class="press-info">
                <? the_title(); ?>
                <span><? echo get('publication_title'); ?></span>
                <span><? echo get('press_date');?></span>
            </span>
        </a>
    <?php endwhile;  ?>

<?php else : ?>
    No Posts Found
<?php endif; wp_reset_query(); ?>
  • 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-07T03:56:00+00:00Added an answer on June 7, 2026 at 3:56 am

    To use custom fields/meta values to order the query_posts result you can use

    query_posts('showposts=10000&cat=3&orderby=meta_value&meta_key=press_date'); // name of 'Press Date' field
    

    For more see Order & Orderby Parameters.

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

Sidebar

Related Questions

I have a wordpress-generated page where I need some posts (in a specific category)
I have created a category template in Wordpress for all posts that are in
On a new WordPress 2.8 installation, I have some posts assigned to category Foo
I have a Custom Post Type, 'ioni_codex' I am using built-in Wordpress category as
I currently have a wordpress blog that assigns a number to each one of
I have a page in Wordpress that loops posts in a specific category. In
I have a page in Wordpress that displays posts with a category of newspaper
i have wordpress blog in my custom built website, i am displaying some posts
I have made a custom loop in WordPress and for some reason, the date
I am running a plugin called Category Posts Widget for WordPress: http://wordpress.org/extend/plugins/category-posts/ It uses

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.