The sort tag has no wiki summary.
0
votes
1answer
93 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:
...
0
votes
1answer
139 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 ...
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
28 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 ...
2
votes
1answer
143 views
Search results sorted by post types
I am working on a site with several post types - 4 to be exact - and I am trying to setup the search results page to have a filter/sort the results by post types.
For example, when a person searches ...
-2
votes
0answers
36 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
0answers
11 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 ...
0
votes
1answer
113 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
105 views
Sort by page information by Ascending Numbers
Basically I have a problem that I have details being pulled from advanced custom fields and I currently have them ordered by page title in ascending order.
However, instead of ordering them Ascending ...
0
votes
1answer
330 views
How to sort by custom field value?
I am using these code to sort most Commented, Most viewed Posts
<?php $params = $_GET;
unset($params['orderby']);
unset($params['order']);
unset($params['v_orderby']);
unset($params['v_sortby']);
...
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 ...
-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
vote
2answers
815 views
wp e-commerce group product by category
Sorry for my bad english.
I have WP 3.3.1 & wp-e-commerce.3.8.7.6.2. On the products page (which use wpsc-products_page.php template) I have list of products. I want to group this products by ...
-1
votes
1answer
37 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.
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.
...
1
vote
2answers
489 views
Wordpress Menu Disappears when $query->query_vars['meta_key'] is set
I've set some meta variables on my WP posts. I want to be able to sort by these variables, and everything is working great except when I sort by either "views" or "likes". When I sort by either of ...
-3
votes
0answers
47 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
69 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
2answers
165 views
Custom Taxonomy Sort For a Custom Query
I am trying to custom sort taxonomies on a custom query I have written for one of my website
I cannot use any custom plugin as I have tried and they do not work with my current setup.
...
1
vote
2answers
138 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
2answers
178 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 ...
1
vote
1answer
661 views
Sorting Posts Via Custom Taxonomy Values Using Checkboxes?
I am working on a project that has a dropdown of custom taxonomy values called "Disciplines", there are only 4 of them in the dropdown. The way it has been designed is that you can select more than ...
5
votes
2answers
321 views
Can the Next/Prev Post links be ordered by menu order or by a meta key?
I have a series of posts that are ordered by a meta_key value. They could also be arranged by menu order, if necessary.
The next/prev post links (generated by next_post_link, previous_post_link, or ...
0
votes
1answer
98 views
How to avoid duplicating same meta_value?
I have "publication_year" as meta_key for some images/attachments.
I want to list all meta_values inside html table, but I don't want same publication_year value to repeat, my code is:
<?php $args ...
0
votes
0answers
69 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
187 views
Query Posts with MetaValue & MetaKey & SortOrder works, but it doesn't override category order [closed]
I have a query, ordered correctly by the meta_key in ascending order, but they are devided into groups of their category.
This example shows the postorder in the WP category editor:
Cat 6
- sub 1
- - ...
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
26 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
110 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
28 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
51 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
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
1answer
22 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 ...
0
votes
2answers
923 views
Sort results by name & asc order on Archive.php
I currently use the following code to list posts in Archive.php but I want the results to be ordered by name in ascending order, I have checked the codex but the answer isn't clear to me, how can I ...
2
votes
1answer
109 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 ...
1
vote
2answers
164 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
49 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 ...
0
votes
1answer
50 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
194 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
100 views
Sort by category and then date?
I'll try to be as clear as possible. My Wordpress site has multiple custom categories and posts types all which need to be displayed on the home page blogroll. But I need the first post on the ...
0
votes
1answer
52 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:
...
1
vote
1answer
896 views
Sort query_posts for Parent Pages to menue order or the count?
thanks to a member here i display my Parent Pages in a 2 column grid with title and excerpt. But for some reason i can't figure out how to sort all 5 Pages by the menu order for example or the order ...
0
votes
1answer
186 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
47 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 ...
2
votes
3answers
357 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
69 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
293 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 ...
