As for the edit (leading zeroes):
/* will print "001" */
echo sprintf( "%03d", 1 );
/* will print "00097" */
echo sprintf( "%05d", 97 );
As for the inital problem:
Obviously, I believe your problem description, but if 'orderby' => 'meta_value' does not produce duplicate results, neither should a change to 'orderby' => 'meta_value_num'.
If that’s the only alteration you make, it should only change order…
Related Posts:
- How to Change Order of Posts in Admin?
- Get current menu_order
- Different post sort order within different categories
- what types of order can I pass to get_posts() via orderby?
- Sort posts by popularity/page views
- How do I reorder (pop and push) items from WP_Query?
- How to put last edited entry on top of the blog-post list?
- Sort post by attributes ‘order’
- How to sort posts by last name (2nd word) on ONE category only?
- Query posts from current year
- Reverse chronology of post listing
- Order Posts by Alphabetical for Each Letter
- Set number of article per number of page
- Problem ordering posts with numbers for titles numerically E.g. 1, 10, 100
- How to choose a sort order (for posts) per category? (ideally when creating a new category)
- Order post by year DESC and month ASC
- Display custom post types by date field
- Change Order of Admin Posts Depending on Meta
- Display posts in alphabetical order for a particular category
- post re-order on my site
- Display posts from #6 to #20 on archive page
- Why orderby=”date” does not support manually changed posts?
- WP_Query orderby not working with meta_value_num and menu_order
- How can I sort posts by the date and a custom meta field?
- Sort WP posts by span value
- How to sort posts inside categories
- Any way for get_next_post() to use the actual post order instead of publish order?
- Custom order for Mysql array
- How to order posts by meta_value and title
- Order posts alphabetically: how to set order=asc in mysql query?
- how to get post order by post id wp_query?
- How Do I Get My Post Tags to Alphabetize?
- While loop articles – if statement order
- Make a vertical dynamic list of posts in alphabetically order and in columns [closed]
- Create a list of posts with topic headdings
- How can I add a box to edit Order on a regular post?
- get_previous_post() while accounting for sticky posts
- Need to know custom code to display random and most viewed posts in wordpress posts and pages
- Posts and order
- Adjust the order for returned posts
- Order posts by date
- query posts with selected post ids first
- How do I display posts ordered by a date custom field?
- WP_Query sort by meta_value_num or date
- Allow reader to reorder posts for themselves (oldest first)
- Random order of the 5 most popular posts
- My custom query is displaying random posts in random order
- Get query result according to merged array
- How to make post button to a random post
- Where is object, property or label in the database that controls the order of the posts being displayed?
- Last three posts not being put in order by date. How to fix this?
- Order by ‘s’ using WP_Query()
- Custom Admin Post Column change order
- How to sort posts alphabetically based on a specific parent category
- Post featured image column on admin post list page
- Search Custom Post Type Pages and Custom Fields in 2 Dropdowns?
- How to Sort Custom columns in admin
- How to output comments number of a post per day?
- Auto Refresh Post List after X seconds
- Query posts from different categories in multisite
- Display all months with posts and inside each month show the 5 latest posts
- Is there a way to backdate posts?
- How to make search for the custom post type?
- WordPress post tag & custom field
- posts_nav_link() not displaying anything
- Visual / HTML tabs vanished on editor
- Why won’t my taxonomy query show up?
- Why WP_Query(‘showposts=5’) shows only 1 post?
- More then one menu items are assigned with “current-menu-item” class
- How can i delay reading posing in 3days for not logined user?
- What happens if I delete all the rows that represents a post revision from the posts table into WordPress database?
- How show categories in admin and get that selected to show posts in index
- Get posts with multiple categories
- Do not show children of a category
- Where exactly should I hook in order to change the post’s ID before insertion in the database?
- WordPress pagination and Post Navigation not working on home page
- Some doubts about how the loop work (trying debugging it)
- Retrieve data from post meta meta_key having ‘_product_fq_image’ while having author_id and post type is PRODUCT
- List latest posts with least comments in WP-Admin
- How to view all posts (on site, not admin) that are uncategorized?
- How to create a list of links to post with specific category
- get category in list of posts // shortcode for custom related posts
- Detect if the currently opened document is a post
- Loop through taxonomies and loop through their terms (Newbie question)
- Spam written by registred users
- SQL trigger failes with post_content
- WordPress infinite post cycle
- Get from the dashboard the ID of the current post being edited
- WP Blog Page Problems – Been stuck for a week
- Add meta box for Featured Image caption in wp-admin/post-new.php
- Any difference betweenn posts and pages for one page?
- get backup file from wordpress database in x days
- How to get images only attached from edit post page
- Multiple approval from editors before publishing?
- Given two custom post types: Automatically add meta fields from one custom post type to another
- How can I get a comment ID on Submit?
- Load Pages Menu in single.php
- Display metabox with date
- get post custom value
- Multi Quick Edit – Possible Or Impossible?