The tag has no usage guidance.

learn more… | top users | synonyms

1
vote
0answers
28 views

Help ordering Post loop by two meta values

Background: I have a custom post type "events" which has a post meta value of a unix timestamp called event start date. I also have a post meta value of ticket_status that has 3 possible values (S=...
0
votes
0answers
9 views

WP-Ultimate-Search : order results by their content

I'm using the plugin WP-Ultimate-Search as a search engine. It searches through my articles, by tags. My articles don't have title, and I'd like to order the results by article's content. I'm using ...
0
votes
1answer
6 views

Best way to sort posts with different types by distance

I'm working on a project that I need to We have x posts, 1 Sponsored (custom meta field), unlimited paid, unlimited free posts (these are types of posts) We need to show 1 sponsored at top, ...
0
votes
3answers
2k views

Ordering Posts with Custom Taxonomy Terms Array

I can't get the order of my posts (organized by custom tax terms) to come out right in my loop. I made a custom post type of 'staff', in staff there is a custom taxonomy of 'staff-title'. I added ...
1
vote
1answer
678 views

Sort posts by multiple meta key values

I'm not new to wordpress, but I'm not very good at PHP. I hope someone can help me, since I already tried to search for a solution for over 5 hours with no luck. So I have an archive.php page where I ...
1
vote
0answers
37 views

Order posts by meta_value even if meta_key is not filled

I want to sort search results by the value of custom field ('name-official') for all posts (is this field filled or not). But when I add filter in function.php like function searchExcludePages($query)...
0
votes
0answers
14 views

Get all post order by meta_key above 0 value

I'd order post by meta_key but i've a problem with meta_value because is some post have (0) value, So my query get only all post have valure above (1) value. <?php $week = date('W'); ...
0
votes
1answer
411 views

Enable the admin to sort custom taxonomy

I added a custom taxonomy (separate categories for a custom post type) like this: register_taxonomy(self::$slug . '_category', array(self::$slug), array( 'label' => 'Kategorien', 'labels' =...
0
votes
1answer
51 views

Comments form custom fields order

I'm trying to add 5 custom fields to comment form. Just use 2 hooks to display custom fields after default fields - 'comment_form_logged_in_after' and 'comment_form_after_fields' like this: function ...
4
votes
1answer
233 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. ...
0
votes
1answer
483 views

Order custom fields alphabetically

I've been trying to order the custom fields alphabetically, but I can't get the ordered list I want... this is the code I'm using: <?php $vMarca = get_field('tienda_marcas' , false, ...
1
vote
1answer
928 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
2answers
37 views

Query random post from different categories

I have six regular categories, not custom (each category having between 5 and 10 posts) and I am trying to display one random post from each category on the page. The problem with the output is ...
0
votes
2answers
20 views

Adding scripts before plugins scripts

I have a site which uses Google's API's for jquery and a fallback for jquery. The problem is that I can't get the fallback to happen immediately after the jquery api attempt. What happens is that the ...
3
votes
1answer
38 views

Sorting posts by multiple values, combined

In this image, 1. The Black letters are default post titles 2. The number before the 'of' is a custom field. 3. The number after the year is the post's published year Now I want to sort this ...
0
votes
1answer
662 views

WP_Query post at custom position

Lets say I have a custom query which based on two custom post types: $wp_query = new WP_Query(array( 'post_type' => array('post-type-1', 'post-type-2'), 'post_status' => '...
0
votes
0answers
49 views

Order ascending is ignored in meta query?

I'm using pre_get_posts to alter my main query and attach a meta query to it. This is on a woocommerce products archive page (...not sure if that would make a difference). function has_upcoming_date(...
0
votes
0answers
43 views

How to select N number of products and display it randomly in Woocommerce

I have a woocommerce setup with about 10,000 products, i would like to display all the latest products on the home page so that i can have N number of latest products from each PRODUC TAG displayed in ...
-1
votes
0answers
14 views

Product Query by meta_value and published date

I've seen some similar posts here, but this none that gives me really the answer. I have products that I want to order by their meta_key '_sku'. The SKU can be a number (ex. 1234) or alphanumeric (...
1
vote
1answer
538 views

the_tags() : display the tags by the order they are typed in in the backend, not alphabetically

I'm using WordPress' the_tags() to display the tags of each post on a single side. What I intend to do is to display the tags by the order they are typed in in the backend, and not by alphabetical ...
1
vote
0answers
16 views

Alter main archive, to show posts with meta as last

I'm having troubles with getting posts with meta_value "sold" as last in the main query of my custom Post type. The best/easiest way i can think of at the moment is to filter the "sold" posts out of ...
0
votes
2answers
420 views

Custom loop of a single category, cannot order by date. What am I missing?

I'm going nuts. All I have is a simple loop on the home page of the site (which is a static page), and it should show the most recent (1) post of a certain category. The trouble is no matter what i ...
0
votes
0answers
20 views

Order posts by term in alphabetical order

I know it's possible to order by terms, but having migrated a huge amount of data from a different CMS, I'm left with a list of brands that are taxonomy terms. I'm using ACF to present the terms as a ...
3
votes
1answer
36 views

Set number of article per number of page

I'm making a timeline using this awesome free theme. As you can see in this theme, it's a timeline separated by "Page". We have "Page 1" with 5 articles, "Page 2" with 5 articles, etc ... I changed ...
3
votes
2answers
112 views

Sort posts by tags in category pages

I would like to sort posts by tags in category and archive pages. (Unfortunately there isn’t an orderby parameter for tags. That would make things so easy!) So a category page would be like this: ...
0
votes
0answers
31 views

Best way to Order Post in Home without a plugin

We are trying to reorder one section of the home page. our approach was with meta_keys and meta_values WP_Query Sample: <ul id="featuredMain" class="feautrued-main"> <!-- Main ...
0
votes
1answer
63 views

WP_Query with multiple orderby NOT working with ASC and DESC, what's wrong?

I have a query with multiple orderby params in a custom page that I am having difficulty getting to work. The query is to return posts with either tag-AAA or tag-BBB tags. And I'd like to sort it ...
5
votes
2answers
8k views

Displaying a custom post type alphabetically

I've created a custom post type which now has around 100 posts in it. I simply want to display these in alphabetical order by the post title rather than the default which seems to be most recent first....
0
votes
1answer
345 views

WooCommerce - Customer Order History Pagination

I'm trying to implement pagination into WC's customer order history that can be seen on the "My Account" page using woo_pagination(). https://docs.woothemes.com/document/woo_pagination/ The template ...
0
votes
0answers
35 views

Reorder posts in a custom Meta Box

I have a list of Posts (of a Custom Post Type) that is displayed in a Meta Box for a different CPT. In this Meta Box I need to enable the user to reorder the posts. Currently, the list of posts is ...
1
vote
1answer
39 views

Sort/list/arrange comments by comment author in un-nested/no thread comments

I've looked far and wide and found nothing about this. I'm wondering if it's possible to sort/arrange all the front end comments, in an un-nested comment by comment author?
0
votes
1answer
18 views

orderby in WP_QUERY - Use the order from the Dashboard

I'm using the Anything Order Plugin to order custom post types in my dashboard. For a wp_query, I'd like the output to order the posts in the same order as I have them in the dashboard. What would ...
0
votes
0answers
46 views

Add post order to function

How to add post order to this function? I would like to display most recent post from newest to oldest: <?php //Establish first post check variable $first_post = true; query_posts('category_name=...
0
votes
1answer
31 views

Show first posts with custom field not empty and order all by title

I have a custom post type called "products". My goal is to make my custom query that I have on homepage and also the search query show first the posts that have a custom field called "id_number" not ...
0
votes
1answer
524 views

Order by title - but now built in wordpress func, sort the_title

I've got a pretty simple WP installation, where I use qtranslate plugin to keep site in two languages. The problem is, I need to sort posts by title, and as probably you know (as you use qtranslate), ...
0
votes
1answer
11 views

Option for pages order in backend

Can someone tell me what is this ordering in pages list in backend and how does it affect anything? Searching for wordpress pages order doesn't give me meaningfull results
0
votes
2answers
64 views

How to quickly reorder posts in the admin panel that will persist for the wp-api

I generally use the Intuitive Custom Post Order plugin for any WordPress sites I work with so clients can order their posts visually. For this project, I'm using WordPress as an admin panel and ...
0
votes
1answer
1k views

WP_Query orderby random do not repeat infinite scroll - one loop

I have found a lot of documentation on solving this issue with multiple loops, I'm finding it hard to see a solution for one custom loop. Problem: I'm using infinite scroll to load in the next page ...
0
votes
1answer
64 views

Orderby taxonomy term id using get_posts not working

I'm looping through a series of custom post types and then grouping those by a taxonomy term. That is working great, however I have not been able to order these groupings by term_id. I used a ...
3
votes
2answers
76 views

get_the_terms in descending alphabetical order

I'm displaying a list of terms that a post is assigned to by using the following: <?php $terms = get_the_terms( $post->ID , 'winetype' ); $sep = ', '; foreach ( $terms as $term ) { echo $...
0
votes
1answer
17 views

Change posts archive ordering

I need to change the order of my default posts archives so I have added this to my functions.php but it doesn't affect anything... I've looked at various examples and from what I can see it should ...
0
votes
0answers
33 views

Show list users based on two custom field values

I'm kinda stuc. I have added an extra field in the user profile for my authors, called ArtistCategory which can be Tattoo or Piercing. I'm using this key and value to filter for menu and gallery ...
0
votes
2answers
43 views

WP Query with multiple post types ordered by custom meta date then published date

Two post types blog and events. I want to list in the same query but order events by their event date and blogs by their published date: $args = array( '...
0
votes
1answer
42 views

Query Posts that have or don't have a meta_value and order by the same ASC

I'm trying to perform a scheduled update to all posts, 10 posts at time. To achieve this, I run Cron job with a script that saves 2 post meta: $DATA: the data I want to be update $TIME: the UNIX ...
0
votes
2answers
47 views

If value present, order posts by two consecutive custom fields

Basically on my site I have a bunch of song lyrics and in a static page I want to show them listed by album Link to my website and album position of the song and I have two custom fields with that ...
0
votes
0answers
22 views

Custom Field - Save Pageviews For Specific Time Period

I have a custom field called page_view to save page views. Now I need another custom field called page_view_last_24_hour to save page views in last 24 hour. Is it possible to use custom field to ...
0
votes
2answers
121 views

How order posts from category by date and comment count?

Just like in topic I try to order posts from category by date and comment_count but code below doesn't work: <?php //get post from current category $category = get_the_category(); $...
0
votes
0answers
15 views

Category page ordered by custom fields with IF conditions

on my site I need to sort posts by a custom field when shown in category pages like this one, but my problem is that I kinda need to do it like this: -if post of the "lyrics" type has the field "...
1
vote
1answer
63 views

Use pre_get_posts to sort meta_key by an array of values

Scenario: I have a bunch of resellers loaded under a "reseller" post type. Each of these resellers have a "rating" which is a string value like Gold, Bronze, Silver - this indicates their status as a ...
0
votes
0answers
33 views

How to allow users to select post order in any archive page?

I have build a something like forum using WordPress (Not using plugins). Now I want to display select filed to select user to post order ( Most recent posts, most active posts, most votes post, etc),...