The tag has no wiki summary.

learn more… | top users | synonyms (1)

0
votes
1answer
184 views

How do I sort multiples pages?

I want to use a dropdown to sort a list of posts in WordPress. The results will display on multiple pages. So how do I pass the query on to the second, third, fourth, etc. pages? Here's an example of ...
3
votes
2answers
691 views

Sort custom post type list table by display name of a user id stored as post meta value

I have a custom post type named domicile. Each post (domicile) has an owner (not the author). Owners are users with a custom role. I store the user id as a post meta value (dmb_owner) for the domicile ...
1
vote
1answer
2k views

sort events based on event date custom field

I'm trying to list events (custom posttype 'kurs') by event date, which are stored as custom fields ('dato'). My loop so far looks like this: <ul> <?php $loop = new WP_Query( array( ...
0
votes
1answer
785 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 ...
6
votes
2answers
3k views

Sort admin menu items

On a related note to "Changing the Order of Admin Menu Sections?", I'm looking for a way to alphabetically sort the entries in each sub-section of WordPress's admin area. Currently, whenever a new ...
5
votes
3answers
3k views

Plugin for custom sort order for categories?

I'd like to employ a sort order option in my theme to allow categories to be sorted similar to pages. Can anyone recommend a plugin that does this?
3
votes
2answers
2k views

Custom Post Type, WP_Query and 'orderby'

I do have a custom post type with the following setup: $supports = array( 'title' , 'editor' , 'thumbnail' , 'revisions' , 'page-attributes' ); $args = array( 'hierarchical' ...
5
votes
5answers
1k views

Different post sort order within different categories

I need to give each post a unique post order for multiple Categories (per post) it is in. I can imagine a solution using custom fields whereby for each Category there is a corresponding custom field ...
4
votes
1answer
2k views

Sortable admin columns, when data isn't coming from post_meta

I have a custom post type that uses a custom taxonomy. I'm imposing a limit of a single term to each post (using a custom meta box drop down on the edit post screen for the CPT). The term for the ...
2
votes
1answer
537 views

blog posts sorting doesnt work while using get_query_var

I'm trying to show the latest posts using the get_query_var function. The function filters the posts according to their category. When I'm displaying the posts on the page they appear unsorted ...
1
vote
1answer
1k views

Drop down+sort blog posts date added/most popular

Is it possible to have a drop down menu like youtube/demonoid that allows you to sort your index (and caterogy.php) blog posts by date/popularity/viewed)? I seen plugins for adding most popular ...
1
vote
2answers
568 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: ...
1
vote
1answer
1k views

Sorting archive pages with “pretty” URLs?

We want the users to re-order the posts on a page similar to pagination but I can't find anything anywhere! It would be great to create a link to a url similar to .../page/2/title/, title being the ...
1
vote
1answer
494 views

Sort plugins by rating

When I want to install a new Wordpress plugin, I do a search for the plugin I want, and I receive a list of results. Is there any way to sort the results by rating, or name? If not, it would be a ...
9
votes
4answers
2k 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 ...
3
votes
1answer
3k views

Custom Taxonomy Template Post List with Sort Order

I have an interesting problem I am trying to solve. Here is my situations: I have create a custom post type for "events". For each event post I require custom fields to be entered for the event ...
4
votes
5answers
3k views

How to return results of a get_posts() in explicitly defined order

I'm trying to create a loop of explicity ordered posts, for example: <?php $args = array( 'include' => '1,3,8,4,12' ); ?> <?php get_posts( $args ); ?> The results are ...
3
votes
2answers
2k views

Sort posts alphabetically by custom field value, insert divider between different letters

i'm listing all posts of my custom post type "person" alphabetically sorted by the custom field last_name on a page. How would i insert a divider (e.g. an image of the letter) before a letter range ...
5
votes
6answers
2k views

visually sort ordering “custom post types” for end users

Now with those custom post types and other bits of content that don't necessarily need to be organized chronologically by date, for example: the client has a 100 T-Shirts as custom post type "SHIRT" ...
1
vote
4answers
5k 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( ...
6
votes
1answer
8k views

How to query_posts using meta_query to orderby meta_key AND have a secondary sort by date?

I've been troubleshooting an issue over the past few days and keep going in circles. Could really use a fresh pair of eyes to help me answer this question... So I'm working with a wordpress site ...
5
votes
1answer
4k views

Using meta_query, how can i filter by a custom field and order by another one?

With the following code (in functions.php) my posts (of CPT event) are ordered by _end_date instead of _start_date. What's the proper solution to this as of WP 3.1.3? Of course I'd like to avoid using ...
4
votes
1answer
2k views

Custom sortable columns ordered by meta-value?

I have no idea why my sortable function does not sort my "events" my a custom post-meta. I have a custom-post-type named wr_event… I have my custom columns set up and my post-meta is shown in the ...
4
votes
6answers
5k views

Custom order of terms for custom taxonomy in admin and website

I have a custom taxonomy registered for my custom post type. I need to make it possible for a user to specify the order in which the taxonomy terms should appear (something like menu order for pages). ...
5
votes
3answers
1k views

sortable custom column in media library

trying to make a custom column sortable in the media library. Found lots of examples for posts, and users but can't get them to work on the media library page. function wpse_hook_isv_columns() { ...
4
votes
5answers
2k views

get_pages() not ordering as it should

I'm using get_pages() function to get all subpages from a page like this: $childrens = get_pages(array('child_of' => 7, 'sort_column' => 'post_date', ...
3
votes
1answer
795 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 ...
2
votes
1answer
533 views

query_posts sort in multiple directions

I'm trying to improve my post sorting by using multiple criteria, but I want specific orders for different values. For example, I have a meta_key called 'featured' that I want to move any post up to ...
1
vote
2answers
1k views

How to build a directory with indexes in Wordpress

I am working on a site that is using posts as a way to manage glossary articles like the example site below. I would like to find a way to display articles alphabetically and grouped by a selected ...
0
votes
2answers
3k views

Sorting problem with 'query_posts' funcion in wordpress. Sort by custom field not working

0 down vote favorite Hi, I am working with wordpress where i have a event listing system. There is a custom field in my post called starting_time which is unix timestamp. Now i want to short all ...
4
votes
1answer
1k views

How to order adjacent posts (prev / next) by custom field value?

I am using the More Fields and More Types plugins to create a custom post type called product. This custom type is based on the Post type. One of the fields is named lot which is an integer ...
3
votes
4answers
5k views

Sorting a query by custom field date

EDIT: Reworded the question for more clarity I'm trying to sort by custom meta box data, which I am converting to a date using the strtotime function, but I'm having some difficulty. My chief ...
2
votes
2answers
7k views

Setting Custom Sort Order of Posts within a Category

I've got this category setup that includes several posts. By design it's not a blog, but a staff listing. Currently all of the staff members have their own posts with the category. I'd like to be able ...
2
votes
2answers
1k views

Sort by custom field value

I have a page where I only want to show posts from a specific category. At the same time, I want the posts to be sorted by a custom field value in my posts: query_posts('category_name=' . ...
1
vote
2answers
391 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
2answers
886 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 ...
1
vote
1answer
1k views

How to use WP default post list tables in a plugin?

I'm developping a plugin to manage a base of users and I'd like to show them in the same type of table used in other parts of the WP admin (post lists, user lists, etc.), I'd like to have the same ...
0
votes
0answers
27 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
87 views

Admin - post order by category and sub category

I am trying to get the list of posts ordered in the admin area when sorted by their parent category. Ideally it would sort like this: parent category 1 -child category 1 --post 1 --post 2 ...
0
votes
1answer
2k 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
2answers
673 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
126 views

Adding Sorting to Website?

I would like to add sorting but don't have any idea how ot go about it. I would like to be able to sort by: Date, Title, Price (custom field), Comments, Views, ASC + DESC What would be the ...
0
votes
1answer
959 views

How to choose a sort order (for posts) per category? (ideally when creating a new category)

Assume I have a bunch of posts (articles) in two categories: "upcoming events" (cat=1) and "past events" (cat=2). When listing all posts of a specific category out of those two, category 1 shoud be ...
0
votes
2answers
305 views

Ascending sort order for monthly & category view, i.e. ?m=201204, ?cat=4

I have my posts ordered ascending (from oldest to newest) because I use Wordpress as a website to accompany a book published based on the original blog. To do this I put the following code just before ...