The tag has no wiki summary.

learn more… | top users | synonyms (1)

-1
votes
1answer
24 views

Get “wp_get_nav_menu_items” to sort alphabetically

I am trying to return a menu in alphabetical order and not the order set by the user in the backend. I have this code but it is not alphabetical: $args = array( 'order' => ...
1
vote
1answer
125 views

Vertical alphabetically post columns

I need to create a 9 column list that outputs posts sorted vertical and alphabetically. I'm getting closer, but still not there. I have two separate loops I'm working with. The first loop I have the ...
0
votes
0answers
13 views

Sort CPT by first letter of a meta field in a specific range

'I'm working on a way to display member profiles (Custom post type) sorted by the first letter of their last name in a given range. For example all members with a last name starting with 'A' up to ...
0
votes
0answers
43 views

Advanced wp_query - custom date and postname

I'm trying to write a query and sort by: custom date postname (in reverse order) because my postnames have a version string at the end and the latest entry should stay on the top of each other. ...
0
votes
0answers
24 views

How to sort all admin sub menu items in a custom order

i tried this solution given for this question Re-ordering Admin Submenu Sections to sort sub menu items of all top level menus. But i don't get it to work. I have an array of custom ordering of menu ...
0
votes
2answers
41 views

How to orderby meta_value_num with dollar ($) sign

The custom fields all have prices including $ signs, and a dot as separator. $theQuery = new WP_Query(array( 'orderby' => 'meta_value_num', 'meta_key' => 'price', 'order' => ASC )); All ...
0
votes
0answers
36 views

Sorting meta_value as integer doesn't work

This plugin uses the below chunk of code to print the top 10 highscores. But this doesn't get the list of top 10 scores sorted by meta_value in my WP install $scoreboard = new WP_User_Query( array( ...
0
votes
1answer
21 views

Posts with no meta field do not appear when sorting by meta field

I want to order my posts by a custom meta field "fieldA". I am using the following code: $query->set( 'meta_key', 'fieldA); $query->set( 'orderby', 'meta_value_num' ); $query->set( 'order', ...
0
votes
0answers
20 views

Multisite: List all Blogs alphabetically [duplicate]

Right now I do this … <ul role="navigation" class="sektionen"> <?php $blog_list = wp_get_sites(); foreach ($blog_list AS $blog) { global $blog_id; ...
0
votes
3answers
55 views

Sort Posts By Category?

Googled this for hours, cannot find a solution. On my theme you have a Browse page which pulls all the videos from the Custom Post Type I am working with. If a user makes 30 categories then id like ...
1
vote
1answer
33 views

Sorting Custom Posts on Archive page with pagination

I've got custom taxonomy archive pages with a drop down list that allows users to re-order/sort the posts. It basically waits for the user to select from the drop down then uses array_merge( ...
1
vote
1answer
38 views

Taxonomy Terms - Orderby Custom Value

I have a custom value which is being stored as term_group but in the admin panel I would like to order them by that term group. I'm able to sorta do this through this function, but there's a problem: ...
2
votes
1answer
64 views

How to make orderby 'meta_value_num' OPTIONAL?

$args = array( 'cat' => 5, 'posts_per_page' => 8, 'meta_key' => 'custom_sort_order', 'order' => 'ASC', 'orderby' => 'meta_value_num' ...
0
votes
0answers
43 views

Query category-specific, paginated posts and allow viewer to change sort order

Maybe this has already been asked here, but I can't seem to find a solution, so forgive me if this is a duplicate. I have coded a custom template to display all posts from a category with the ID 36. ...
0
votes
0answers
27 views

How to let users sort list of categories?

In my homepage, I have listed all of categories, under which their posts, are listed like this: Category 1 post 1 post 2 post 3 Category 2 post 4 post 5 post 6 ...
0
votes
0answers
8 views

Sort posts by category priority [duplicate]

I have 5 categories and I would like to show All posts. But I want to show "news" category posts at top of page and after other posts in other categories. How I can do this?
0
votes
1answer
43 views

Sorting posts according to view counts not working

I use the code snippet below to get views count of each post on my sidebar.php . everything works but the sorting does not. also it does not get 4 posts, it only shows 1 post although I've written ...
-5
votes
1answer
48 views

custom sort posts in archive/taxanomy page

I want to override the default sort order of posts in archive and taxonomy pages. what hooks should I implement?
0
votes
1answer
107 views

How to manage a particular “order by” for get_search_query()?

How to manage in the search.php file the order of a posts search query managed with the following code <?php echo sprintf(__('%s Zoekresultaten voor ', 'website'), $wp_query->found_posts); echo ...
0
votes
1answer
36 views

Sorting get_post_ancestors array

I have written this code for my breadcrumbs (i'll give only the part that I have problem with): } elseif (is_page()) { if($post->post_parent){ $anc = get_post_ancestors( $post->ID ...
0
votes
0answers
37 views

Sorting search results

I am trying to develop a better way of searching my website. I want: Results to be displayed by relevance Pages to be listed first, posts should be listed after pages Searched terms to be highlited ...
1
vote
2answers
98 views

Sort wp post title with alphabetically and numerically?

Is there any possible way to sort a new Wordpress post query by the title, but numerically instead of alphabetically? I have some titles that have a lot of the same name alphabetically, then have a ...
0
votes
0answers
19 views

Sort pre_get_posts by multiple Simple Fields meta values? [duplicate]

I'm using the following code to pre_get_posts: function order_programs ( $query ) { // Check if on frontend and main query is modified if( ! is_admin() && $query->is_main_query() ...
0
votes
0answers
20 views

Post Query Glitch Causing First Post to be Out of Order

My problem is that there is a stubborn post at the top of the set of returned posts that somehow isn't sorted with the rest of them. Despite upgrading to 3.9, this issue still persists. For ...
0
votes
1answer
25 views

sort by name (slug) custom post type

What's wrong in this query ? the sortby=name doesn't change anything. $the_query = 'posts_per_page=-1&sortby=name&order=ASC&post_type=mycustom&custom_cat=mycat'; // query is made ...
0
votes
1answer
45 views

Sort loop with query in the link

I want to add some buttons that will sort the post by name asc/desc etc. I want to use query in the link like this http://domain.tld/?orderby=name&order=asc Is this safe to use? Are there ...
0
votes
1answer
32 views

I am having problem sorting custom post type using WP_Query

I have a custom post type called personnel Look at this code: $args = array( 'post_type' => 'personnel', 'posts_per_page' => -1, ); $personnel_query = new ...
0
votes
0answers
16 views

Sort WP_Query by one meta key and post_date [duplicate]

I want to order by post to check for the existence of a meta key ('featured') and include those posts first and as a secondary option I want to sort by post_date, similar to 'sticky' posts on a ...
0
votes
0answers
36 views

query_posts with sorting on a custom datestamp

I have a custom meta field that I want to use to sort with query_posts but its not ordering my posts properly since it is a datestamp (i.e. 04/21/2014) and its treating it like a normal text string. ...
2
votes
1answer
30 views

wordpress custom_meta ordering of timestamps

So I have a wp meta query that is handling the searching of events which have a start timestamp, and an end timestamp, I want to return all results within the two dates a user picks in the search. ...
0
votes
0answers
57 views

Ordering posts by custom taxonomy in admin area

EDIT @kaiser - this question is slightly different to the answer you posted in that I am talking about sorting by clicking the column title rather than adding a dropdown to filter by taxonomy term ...
1
vote
1answer
113 views

Trying to sort and display categories(not posts) by custom field: 'order'

I'm a WordPress rookie. I've added a custom field to my "Category" taxonomy. The custom field is "custom_order" and its purpose is to hold a number so that my categories can be sorted and displayed in ...
1
vote
1answer
142 views

Possible to create a permalink to sort with meta_key?

I feel like I've been all around the web and back again looking for an answer to this and it's really starting to grind my gears. Not sure if this is the correct way to do it, but I want to add a ...
0
votes
0answers
33 views

wp-admin: Sort users by surname

Is it possible to alter this table in the backend so I can sort users by Name and Surname? I have dozens of users on my multisite that need to be sorted by Surname. Can anyone help me out here? ...
1
vote
1answer
51 views

How to sort a custom wordpress query by combination of meta values?

I'm trying to build a custom query that's a combination of custom key values. For example, with the code below I'm able to sort my posts by how much money they've received (paidusd) and how much tips ...
0
votes
1answer
59 views

Sorting Posts by Date - get_blogs_of_user_id()

I am a newbie who needs to produce a chronological list of recent posts from all sites to which a user is subscribed on a WordPress multisite network. Using the code below, I am able to produce a ...
1
vote
0answers
47 views

Sort results by groups of numbers and letters

I have this code: <?php $letter=' '; query_posts( array ( 'orderby' => 'title', 'order' => 'ASC' ) ); if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> <ul> ...
0
votes
0answers
12 views

Global localized sort order

WP tables were created on import from another server, and most columns got the utf8_general_ci collation. The problem I'm having is that menus are sorted in the wrong order for the language of the ...
2
votes
0answers
79 views

Column sorting with emtpy meta values

I am trying to sort my custom post type columns in the admin area. There's two ways I found to do this: At first this was my way to do it, however I got some strange behaviours. If a meta value is ...
1
vote
0answers
81 views

Custom taxonomy/category order

My products are sort by menu_order, but I would like to sort category name too. I tried a few plugins and all doesn't works. Code, which display category name and products list: <?php ...
0
votes
0answers
113 views

Sorting posts by first letter of the last word in title

I have a CPT called author that has a first name and a last name as title. To alphabetically sort these posts by surname I use this filter: function posts_orderby_lastname ($orderby_statement) { ...
0
votes
0answers
40 views

Grouping posts starting with same letter

I have a CPT called authors. Titles include first and last names. To alphabetically sort these posts by surname I use this filter: function posts_orderby_lastname ($orderby_statement) { ...
0
votes
0answers
52 views

Does WP search natively return results sorted by type (post, post type, page, category…)?

I found many solutions to sort search results by type, yet in default WP theme twentythirteen (and probably any other), search results seem to be already sorted by type. I would like to get ...
0
votes
0answers
181 views

List post in wp-admin and sort them

this is my first public plugin called Sort posts in taxonomies. With the plugin I intend to list regular posts and custom post_types in the Category(Taxonomy) edit page in wp-admin. Further give the ...
0
votes
0answers
108 views

How do I call the dashboard's sortable javascript in a plugin page?

I want to create a multi-column sortable widget area in a plugin's settings page. In order to test this, I started by directly copying my dashboard's HTML content from <div ...
0
votes
1answer
146 views

Sort posts by title, sort array by largest number [duplicate]

I am using the post to display attorney verdicts and case details. The post title is the verdict amount entered as a string. (no $ "," or ".") I am formatting the title using PHP number format: EX: ...
0
votes
0answers
67 views

Multiple metadata checkbox sorting

I'm searching for a while but cannot figure how to do exactly... I want sorting my custom post type posts with multiple checkboxes metadata in front-end of an archive page. All store in a session. ...
0
votes
1answer
272 views

Sort All Posts by Category Name in the Admin Panel?

I'm working on a pretty complicated site where everything is managed by category type including automatic spinner image submission, etc.. Unfortunately, its doggone difficult to manage things when the ...
1
vote
1answer
135 views

Alphabetical sorting of custom post type - one letter per page

Basically what I am looking for is a way to sort custom post type in alphabetical order and separate each letter, so you have one letter per page. See illustration. Hopefully there is a plugin or ...
0
votes
1answer
46 views

How do I sort post listing by child post count?

I have two custom post types called questions and answers. The questions list includes a custom column which displays a count of the answers for each question. I need to be able to sort the listing ...