The tag has no wiki summary.

learn more… | top users | synonyms (1)

4
votes
1answer
80 views

How to sort terms with diacritical signs?

I have list of terms which happens to be the Polish Alphabet. Here's how I list these terms: <ul> <?php $terms = get_terms("taxonomy", array('orderby' => 'title', 'hide_empty' => ...
1
vote
3answers
2k views

How can I set a default listing order on the admin page for a custom taxonomy? (without plugins)

I'm researching this problem for days without any success... What I want is very simple: to see my custom taxonomy terms sorted by ID on the admin page. I can't believe that something this simple ...
2
votes
1answer
644 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 ...
0
votes
1answer
276 views

How to keep track of when a vote is cast?

I have setup a great voting system on my website, but since I want to sort the top rated posts by week, month and alltime...I now need to able able to keep track of when a vote has been cast. Could ...
-1
votes
1answer
341 views

Sort author list alphabetically

I have narrowed the code down to this: <?php $authors = $wpdb->get_results('SELECT DISTINCT post_author FROM '.$wpdb->posts); if($authors): foreach($authors as $author): ...
1
vote
1answer
2k 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
1answer
164 views

Custom-post-type-archive: posts sorted/filtered by year?

I have a custom-post-type wr_event whose posts are sorted by meta_key "event_date". Therefore I have this handy function … function get_event_list( $latest = true, $order = 'ASC' ) { echo ...
3
votes
2answers
3k 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' ...
0
votes
1answer
166 views

How to order posts by number of Vimeo Likes

I have number of posts that contain embeded video from Vimeo, I can get vimeo likes and display them inside the post using vimeo API but how can I order those posts by number of Vimeo likes?
7
votes
1answer
9k 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 ...
1
vote
1answer
103 views

Sorting posts by custom field value

I am trying to sort posts by their custom field value, which is a date in this format: 9 August 2012, 7:18 am 'orderby' => 'meta_value', 'meta_key' => 'wprss_item_date', ...
6
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', ...
0
votes
1answer
133 views

Simple Data Table Update and Page Integration

There are a variety of tables (page-level, not database) in a website I manage that need to be regularly updated. The difficult issue is that this information is often only one or two data columns, so ...
1
vote
0answers
185 views

wp e-commerce sort by stock

I have a site using wp e-commerce plugin and want to sort items by stock. I have been trying for hours without any luck: I don't have an option to sort by "SKU" in the administration (as I've read ...
0
votes
2answers
194 views

Custom Query Fields - Altering Meta Value

I'm giving Custom Query Fields a shot for filtering/sorting posts on the front-end of a site. The instructions seem pretty self-explanatory, but I do have another layer that I'm trying to figure out. ...
2
votes
1answer
191 views

Sort by posts that have a featured image?

I'd like to sort posts on the index page to show those that have a featured image first. I've done this in functions.php: add_filter( 'pre_get_posts', 'my_get_posts' ); function ...
2
votes
1answer
247 views

Sort posts by newest child while keeping hierarchy intact

I have the following hierarchy within my wordpress posts (e.g.): -> Post 1 (pubdate: 2011-01-01) --> Post 5 (pubdate: 2011-01-02) ---> Post 6 (pubdate: 2011-01-03) ----> Post 7 ...
3
votes
2answers
885 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 ...
2
votes
0answers
193 views

How to sort posts by last name (2nd word) on ONE category only?

I have an "author" category that is used as a list to browse multiple posts containing author biographies. I have Smart Category Ordering installed and right now it is sorted by title ascending. ...
3
votes
1answer
1k views

How can I custom order the results from wp_list_categories?

I am using wp_list_categories to return (you guessed it) a list of categories within a custom taxonomy. The orderby parameter accepts sorting by ID, name, slug, count, and term_group. Is there a way ...
0
votes
2answers
729 views

Sort custom posts in archive by multiple values: date AND meta key

I have a post type and I want to sort posts in its archive according to two values: by a meta value called "artwork_year" which contains a 4 digit number (year) by post publish date what the query ...
0
votes
1answer
519 views

Plugin that lets visitors Like a post (not facebook) and stores likes in custom meta?

Does anyone know of a plugin that has a like feature or thumbs up down etc which stores these likes as custom meta data? Not a facebook like. I'm currently using WTI Likes which stores the data in a ...
0
votes
1answer
732 views

How to sort posts in a custom post type by title in ascending order by default?

So I am using a custom post type to create a listing of businesses. Each post made, contains information about each business. The title of each post is the name of the business. When I go to the menu ...
4
votes
4answers
6k 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 ...
0
votes
2answers
201 views

Sorting posts by specific order

I have a custom post type and I want to be able to control the order that the posts are displayed by defining the order in an array, and then checking the posts meta_value against the array to see ...
1
vote
1answer
405 views

Sorting multiple custom post types without a meta key/value pair by sort order

At this current moment. is it possible to sort multiple custom post/page types without a meta key/value? I'm looking to just sort the posts by page attribute order: What have i done so far? I've ...
2
votes
2answers
621 views

Is it possible to order posts by two meta values?

Hopefully this is a reasonably straightforward question! Is it possible to order posts, on the front-end of my WP install, by two meta values? I have a meta key called genus and another called ...
0
votes
2answers
385 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 ...
0
votes
1answer
1k 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 ...
2
votes
1answer
183 views

Sort a custom post type array numerically

We've set up drop down lists to allow people to filter posts based on custom post types. In order to populate the drop down list I am using: <?php $terms = get_terms("ratios"); $count = ...
0
votes
2answers
225 views

Custom loop request based on custom field

I have many post, all categorized. So 100 post, 40 in cat=4. All those 40 post have a custom field name point with a rating in there (how many point win). Si the question How to loop through all the ...
2
votes
2answers
251 views

Sort Posts Best Practice

I have a custom post type "Properties". These properties posts are being listed out on page "Properties For Let". Each property post has various custom meta including price, and number of bedrooms. ...
5
votes
3answers
2k 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() { ...
5
votes
5answers
2k 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 ...
2
votes
1answer
1k views

Adding meta_key via pre_get_posts causes navigation to disappear

I'm writing a custom function that allows the posts to be sorted based on a custom field. When the user submits the "sort by" form, the meta_key (as well as orderby and order) parameters by which the ...
3
votes
1answer
346 views

Sorting by tag or category

Here's the scenario: A user clicks on a tag which takes them to a list of all those posts with that tag. There are hundreds of posts, so the user needs a way to filter these. Here's the question: ...
1
vote
1answer
133 views

Sort posts by meta key that is serialised with other meta keys

I need price sorting, where price is a metakey that is serialisez with other metakeys and stored in wp_postmeta I need something like this: When user click on free (Anchor tag) it should show posts ...
2
votes
0answers
256 views

wp_list_pages sort order is different for different languages [closed]

I'm using the following code wp_list_pages(array('exclude' => '','title_li' => '','sort_column' => 'menu_order')) If I switch the language the sorting is different. One of the main menu ...
3
votes
1answer
648 views

Sort posts by number of matched terms

I have form where I list all terms associated with posts as check boxes, user should pick few of them, hit search and get all posts that match all chosen terms. It works great when there are posts ...
1
vote
1answer
97 views

Sort posts by most recently modified

Is there a way to list posts in the order in which they were modified? For example; A user posts 5 posts (#1 being the oldest and #5 being the newest), by default they would be listed with #5 being ...
4
votes
1answer
3k 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 ...
0
votes
1answer
497 views

Does wp track views for posts?

I want to do a query and sort posts by views. Is this possible? I'm not even sure where to start..
1
vote
4answers
2k views

Loop through all tags & output posts in alphabetical list

I have a bunch of posts that each have multiple tags, and I'm trying to find a way to output all of them on a single page, organized under an alphabetical listing of their respective tags. E.g. if ...
0
votes
1answer
542 views

ASC and DESC separately from orderby

So I got this to sort my posts and it works great: <div class="sort"> Sort by <select onclick="if (this.value) { document.location = this.value; }"> <option ...
0
votes
1answer
86 views

How to list post as buch of category, and all of them

I like my homepage not to list only one category, but to list all category, group by post. Here is the request : Cat 1 2 3 4 5 and the post will be : post 1 (cat=2) 2(cat=2) 3(cat=1) ...
0
votes
1answer
140 views

Can't seem to do combined query AND sort?

Below is the code I'm using to query multi-day events. The problem I'm having is that I can either sort by the start date (evstart_date) OR I can do a combined query against start date and end date ...
3
votes
0answers
412 views

Plugin for sortable posts in grid [closed]

I'm looking for a plugin that will emulate this current php page: Each flower to be a post with more info. The dates to be sortable Current blooming flowers to be featured in the widget sidebar ...
1
vote
1answer
980 views

Order posts using a custom array

I have an array of post ids which I'm passing to query_posts using 'post__in'. My question is how can I use the order from my array rather than ordering by 'date' etc?
1
vote
1answer
144 views

How to display sorted posts in the 'All Posts' page

I've been following this tutorial to build a sorting page for my posts: http://soulsizzle.com/jquery/create-an-ajax-sorter-for-wordpress-custom-post-types/ The sorting works fine, but the new sorting ...
0
votes
1answer
243 views

Query posts alphabetically within this function

I've been given some code to tidy up and edit a bit and the client wants to organize a custom post type named "plans" alphabetically. It's not a straight forward query and I've never come across ...