The sort tag has no wiki summary.
0
votes
0answers
22 views
Sort by user meta data
I am using the plugin: ep-display-user and can't get it to sort by meta. This is my code:
function epdu_get_users($visible){
$user_ids = $this->wpdb->get_col("SELECT ID FROM $this->table ...
0
votes
1answer
57 views
How to create a category and sub-category sorted blogroll with all posts?
I would like some help to post all the posts of my website into a blogroll sorted by categories and subcategories.
The end-result HTML I would like to see displayed would be something like this:
...
-2
votes
0answers
30 views
Get all posts starting with first two letters in Wordpress
I have a plugin in which an alphabetical list is posted where people can click on a letter and they get the posts with that letter. So if they click on A, they see all post titles starting with the ...
0
votes
1answer
24 views
How to get alphabetic listing x other posts, based on first letter post?
Let's say I have a post called "Hello World" and I am on that page... Let's say I have different posts like "Haaaa" and "Hoooo".... What I want to do is showing Haaa and Hooo in a different place (let ...
0
votes
0answers
10 views
Filter by Author on Category Pages
I'm looking for a solution to filter/sort posts by author on category pages/archive pages, ideally by means of a drop-down menu.
I've searched the Wordpress plugin repository but cannot find any ...
-1
votes
0answers
48 views
Sort post in a category alphabeticaly with the stick in that category on top?
I need to be able to sort posts in categories alphabetically with the sticky posts in that category listed first on top also sorted alphabetically.
Apple*
Banana*
Watermelon*
Coconut
Grape
Orange
...
0
votes
1answer
12 views
List CPT by menu_order with children right after parent
I registered a custom post type drawer where my posts are ordered using menu_order. Each drawer could be a child of another drawer, on a multiple depth (parent > child > child of child > child of ...
-1
votes
1answer
36 views
Search from Post on the basis of custom fields
I have shown all the Post on a page. Where i want to add Filter for sorting Like Date and other Custom Fields.
So how can i Do this Please Help me.
-3
votes
0answers
46 views
Sorting posts by date, title or keyword. [closed]
I want to give the site users the ability to sort posts by title, date, or keyword.
How can I do that in WordPress?
1
vote
1answer
57 views
How to display posts via custom taxonomy terms using checkboxes?
I would like to have a form with checkboxes. Each checkbox would be a term of my taxonomy "cities". The idea is that if a user select any of the checkboxes, it should show all posts that are NOT in ...
0
votes
0answers
66 views
wp_query orderby value not from meta_value
I'm using the myreviewplugin to add ratings to posts. I'm now working on the posts loop and customising the query using wp_query.
Everything is working fine, but I need to expand the orderby ...
0
votes
1answer
30 views
Sorting custom post type by usermeta
I have a profile (a CPT) directory set up and I'm trying to find a way to sort the results based on the last login time of the post author. The goal is to reward recently logged in authors by pushing ...
1
vote
2answers
24 views
Categories sorting
I'm using code below to spit out custom post types along with its categories, so
Category 1
---post 1
---post 2
Category 2
---post 1
---post 2
---post 3
etc.
That works well for ...
0
votes
2answers
109 views
Add multiple orderby with pre get posts
I am already using a small code to set default sort orderby a custom field called "Year" I need to add another orderby to also sort by "Post Title" in the same sort.
Sort = Year-Customfield (DESC) ...
0
votes
1answer
27 views
sort custom post type by display name
I am trying to sort my custom post type in a few different ways using a dropdown.
When I try to sort it as the display_name it doesn't work.
$wp_query = new WP_Query(array('orderby' => ...
0
votes
1answer
49 views
register_post_type sort order by title by default
If I add a custom post type (example code below), in the admin page for the new custom post type the posts are sorted by ID by default. Is there a way to set the default sort order to the post title ...
0
votes
1answer
20 views
I would like my page editor to be sorted by date created, or updated, instead of in Alpha order, is this possible?
When looking at my "All Pages" they are listed in Alpha order, and I have to scroll through to find what I am updating. Is there a way to have a preference setting that it be sorted by date, without ...
1
vote
2answers
159 views
Wp_query: sort by PHP variable
Here is my problem:
For my articles, I use a custom post type "exhibitions" and posts for all other news. I am displaying them in one query ['post_type' = array('exhibitions','posts')].
The orderby ...
0
votes
0answers
48 views
Archive page - display specific post first
This is something I haven't heard of before but must be fairly easy to do?
In the archive.php file, Given the id of a certain post (probably passed as a variable through the url) I want to know how I ...
2
votes
1answer
106 views
Using database meta_values to calculate new post order using pre_get_posts or a 'request' hook
UPDATE: I have worked out my implementation of the selected answer at the bottom of this post.
I'm implementing a sorting algorithm based on Reddit's hotness algorithm, in addition to a time-decay ...
0
votes
1answer
48 views
Sort categories by meta value
How can I make a list of categories with 4 last posts in each where every category is sorted by meta_value.
For example, template without sorting by meta_value is http://pastebin.com/AeH6vx9b
It ...
0
votes
1answer
98 views
Gallery shortcode numerical sorting
When I try to sort a Gallery created through the [gallery] shortcode by numerical titles I get them sorted in alphabetical order. That means that they are sorted like so:
1, 3, 34, 4, 56, 6, etc.
...
0
votes
1answer
190 views
Ordering of gallery images without using shortcode in theme
I using the built-in gallery in wordpress to store and sort images inside a custom post type. In the theme I was using:
$attachments = get_posts(
array('post_type' => ...
0
votes
1answer
51 views
Multidimensional array sort?
If i have a set of years, retrieved by the loop, for every years can be more post ID.
Like:
2008 => 3,7,8
2009 => 4,5,6
2010 => 9
the code is:
...
0
votes
1answer
170 views
query_posts and custom taxonomy posts order
i have a custom taxonomy defined for "Projects" and a page that shows all the projects. In this page there's a jquery filtering menu (isotope). Initially the page must show all the projects but ...
1
vote
1answer
44 views
Wordpress Custom post query sorting does not work
I created a custom WP query to collect products that have 3 different taxonomy values in them and sorted them by price using the following:
$my_products = new WP_Query(
array(
...
0
votes
1answer
46 views
Autosort uploads in galleries by filename
A client of mine wishes to not have to sort images uploaded into a post gallery, but instead rely on its filename for sorting (e.g. "01_sample.jpg", "02_sample.jpg"). This would save a lot of time for ...
1
vote
2answers
133 views
Sort Posts by Multiple Meta Values
1) Custom Post Type named "Buying_Locations"
2) Each Post has three meta values of: State, City, Store Name
QUESTION:
How can you show a list of these posts sorted alphabetically by State, then ...
0
votes
1answer
68 views
WP_Query posts by distance based on LAT & LNG in Database
I've got table in the WordPress database that has lat & lng stored and I'd like to add a sort feature on the results page 'Sort by Distance' that gets the locations that are closer to your ...
1
vote
1answer
281 views
Auto sort the wp-admin post list by a meta key
I am using this following code in my functions file to hide and add some custom columns to my post-edit screen in wp-admin.
I am now trying to get the post list to sort by a post meta field (last ...
0
votes
0answers
37 views
WordPress Multisite - Sort site / blog column
I use WordPress Multisite and made a plugin that adds columns with some data.
Code example
My code is based on the function:
http://wpengineer.com/2188/view-blog-id-in-wordpress-multisite/
Key ...
0
votes
1answer
85 views
how can i change WP main archives loop to sort by name or title
I've got the following code which i found somewhere else i use it for pagination.
I don't understand all of it although I've read codex.wordpress.org/Class_Reference/WP_Query several times. they ...
0
votes
3answers
1k views
How to get Page/Post Gallery attachment images in order they are set in backend using WP_Query()?
I am trying to retrieve all the images from the Gallery of a page in the order they are set in the backend.
So far I have:
$my_wp_query = new WP_Query();
$all_wp_pages = $my_wp_query->query(
...
0
votes
2answers
175 views
get_terms orderby name as numbers
I have a custom taxonomy filled with terms such as 'volume 1', 'volume 2', 'issue 1', 'issue 2', 'issue 10' and get_terms orderby name returns list as:
issue 1, issue 10, issue 2 though I need it to ...
0
votes
1answer
293 views
Order by custom field date?
I've created a category "Expire Soon" and i want to insert and sort the posts by custom field "expiration_date".
I use this code but the posts are sorted by custom field "expiration_date" but not by ...
1
vote
1answer
156 views
Crafting WP_Query array, sort by date
question about wordpress WP_Query:
'post_type' => 'event_date' outputs dd/mm/yy ex: 31122012
I would like to order my frontend 'event_date' output not by latest WP post entry
but by latest ...
1
vote
1answer
147 views
How do I sort a custom post type admin column using two meta keys?
I have created a custom post type along with custom columns. One of my columns displays a date range such as "12/05/2012 - 11:00 am to 12/15/2012 - 1:00 pm". This is a concatenated string using a ...
2
votes
3answers
352 views
Sorting results from JSON-API on custom fields
Is there any way, out of the box, to sort results from the JSON-API plugin based on values in custom fields? The request is paged, so the results will need to be sorted server-side.
I have an http ...
0
votes
1answer
110 views
ISOTOPE - Missing/Invalid Arguement Get Terms
I am trying to use the isotope plugin for sorting on my taxonomy page and even though I don't know much about how to set it up, I tried using some advice found on here.
Wordpress and isotope ...
1
vote
1answer
83 views
Arrange and separate posts
On a particular archive page I've created, I'm listing a number of posts by post name and they're listed in alphabetical order. Is there away to have them separated even further?
As in all posts ...
0
votes
1answer
148 views
Filter/Sort Post Form On Taxonomy page
I am trying to create a form on the taxonomy template that will be able to filter the posts the current user is viewing. I want to use a few drop downs and submit button to do so.
My code looks like ...
0
votes
1answer
110 views
Select custom posts by meta_value and sort by a different meta value
I have my query set up like this:
$article_query = new WP_Query(array(
'meta_key' => 'issue',
'meta_value' => $post->ID ,
'post_type' => ...
1
vote
1answer
162 views
Archive listing of posts by publish year (multiple years)
I have an archive page showing all blog posts (in a specific category). With a growing number of posts, I want to separate these by publish year. For example (simplified), I'd like the following:
...
0
votes
1answer
46 views
How can users sort multiple pages?
I'm using the following code to display a list of properties on multiple pages. I would like to give users the option of sorting the results by custom fields (perhaps city, or property name, or ...
0
votes
1answer
130 views
How to Sort posts by Vote Count?
Does anyone know how to automatically sort posts by Vote Count?
I am using a plugin called WP Voting where a visitor can vote on a post. The plugin keeps track of how many votes each post has. The ...
4
votes
1answer
126 views
How do I allow users to sort posts? [duplicate]
Possible Duplicate:
How do I sort multiples pages?
I want to allow users to sort a long list of posts (that are displayed on multiple pages) by custom fields.
Here is my form...
<form ...
0
votes
0answers
79 views
get_option( $options ) for multiple options in an array [closed]
I have created a sortable bar where with different options of orderby queries, like Random, Most Recent and others. The code looks like this:
$orderby_sort = array(
'date' => __( 'Most ...
0
votes
0answers
14 views
How do I sort multiple pages? [duplicate]
Possible Duplicate:
How do I sort multiples pages?
I would like my users to be able to sort a list of posts with a drop-down. But I'm having problems because the results are on multiple ...
0
votes
2answers
58 views
Filter and Search
I am working on my site which is a WordPress based site. It is a sweepstakes site well winprizesonline.com is the site which inspired me most. Now I want a dynamic search like that site on my site but ...
0
votes
1answer
135 views
WP_Query -> sort results by relevance (= most tags / taxonomy terms in common)
I'm trying to write a new "related posts" widget (for the single post view) for my custom post type, filtering by custom taxonomy terms that the related posts should have in common with the current ...
