Tagged Questions

The tag has no wiki summary.

learn more… | top users | synonyms

-2
votes
0answers
12 views

How to change post categories order per post basis? [on hold]

I got stuck trying on a way for sorting categories of posts per post basis. Does anyone know a plugin or a code to help with that? i'am not a tech guy so i ratter go with something already built..
0
votes
0answers
10 views

Custom Admin Menu Order

I have a simple solution in my functions.php for reordering the admin menu. Here it is: // Admin menu - reorder function custom_menu_order($menu_ord){ if (!$menu_ord) return true; return array( ...
0
votes
1answer
22 views

Can't sort custom column on user.php by number / meta_value_num?

everything else works fine but it's still not sorting by number. Would just like to know what I'm doing wrong here Here's the code function add_user_columns( $defaults ) { ...
1
vote
1answer
31 views

Order posts by condition

I need to get 15 posts. If there are any with a tag featured, I want them to be first. If there are none, I want the rest to be random posts. My idea was to sort posts based on a condition ...
3
votes
1answer
50 views

How to put last edited entry on top of the blog-post list?

In the list of my blog posts, the "last published" entry is on top. I'd like to view the "last edited" entry on top of that list. I couldn't find a setting for that, so how can I realize it?
0
votes
2answers
31 views

ascending order custom post type

I'm trying to sort a custom post type in ascending order (instead of the default descending). Registering the post type like so: function codex_custom_init() { register_post_type( 'calendar', ...
0
votes
1answer
35 views

Order WP_Query results in order other than ASC or DESC

I have pages with a custom field "language" which can be, say, "EN", DE" or "FR". On a category page I want to output them in a specific order, say, first EN pages, then FR pages, then DE pages. It ...
0
votes
0answers
8 views

Where is object, property or label in the database that controls the order of the posts being displayed?

I'm trying to update the database once the user has re ordered the posts via a draggable js plugin whilst is_user_logged_in(). I'll probably have a save button on the front end (in logged in mode of ...
0
votes
0answers
18 views

Ordering a custom meta query

I have a events custom post type. Each event has to meta fields: eventstart and eventend. These are both YYYY-MM-DD style dates. I am trying to get a list of my events that have a start date OR end ...
1
vote
2answers
95 views

OrderBy multiple custom meta fields

I have a custom post type in my plugin named members, along with two custom fields; first_name and last_name. I am trying to order my listing my the last name, then the first name. The only solution I ...
0
votes
1answer
55 views

Can One Taxonomies Terms be Ordered by A Seperate Taxonomy?

I need some advice. I have a post type called "Movies" for example. Inside Movies, I have two taxonomies: Genres and Ratings Under Ratings my terms are 5 star, 4 star, 3 star, etc. Under Genres ...
0
votes
2answers
22 views

Changing posts order on a page

I have a template that has a dedicated page for STAFF. The only problem is, I can't rearrange the entries. In other words, all the entries are automatically sorted based on time when the data was ...
0
votes
0answers
37 views

Show sticky post before other WP_Query

$recent_posts = new WP_Query( array('posts_per_page' => $blog_num_posts, 'paged' => $paged, 'post_type' => 'post', 'post_status' ...
1
vote
1answer
33 views

How can i define the order of blogs in a multisite network manually (like pages)?

I created some blogs in a multisite network but now i need the possibility to control the order of those blogs. There is a list of all blogs on the main page and it is ordered by blog id by default, ...
0
votes
2answers
17 views

Filtered by a custom field, ordered by another

I am trying to loop custom post-types, filtered by a custom field artist-status => invited and ordered by another custom field last-name alphabetically. Here is what I managed to write, and it ...
3
votes
2answers
124 views

Query by one meta_key and sort by another (possibly NULL value)

I want to query by 1 meta key, but sort by another key that may or may not exist, and then by post date So the end result would be something like: Meta Key A / Date 1 Meta Key A / Date 2 Meta Key B ...
0
votes
0answers
43 views

WP_Query Order by Specific Post ID First

I'm creating a website where I have a need to show a set of posts from a custom loop but I need to display a specific post first. This post will be dynamically specified in the URI by a $_GET ...
0
votes
1answer
29 views

Orderby two meta fields not working

Good day. I have the following code: $args = array( 'post_type' => 'property', 'tax_query' => array( array( 'taxonomy' => ...
0
votes
2answers
80 views

WP_query orderby not working after WP4.0 update [closed]

On my Wordpress-website, I have a custom post type used to display events and a page showing all events in the database. On that page, I'm creating a new WP_Query and displaying the results ...
0
votes
0answers
58 views

Custom Post Type admin order by usermeta value

I would like to allow admins(and users) to order the listing of posts by editor(custom role) last name(ASC or DES) while viewing the listing of posts in the admin area. I have a custom post type that ...
0
votes
0answers
30 views

Inconsistent post order using wp_insert_post

I am retrieving a consequent (~4000) number of posts from a database that I want to save to my WordPress database. I am inserting them this way: include("wp-config.php"); $con = ...
0
votes
1answer
24 views

Custom query to order by multiple taxonomies

I got this website from a customer to fix some bugs. They are a car dealership. The previous developer created a custom post type (vehicle) and there are two taxonomies: make and model. (they are not ...
0
votes
2answers
43 views

How to display custom post type ordered by a custom field date

I have a custom post type for a timeline activities. each post of them has a custom field type of DATE. field name :activity-date I'm using TYPES plugin for Custom Post Type and Custom Fields I ...
3
votes
3answers
282 views

Display all posts in category, with specific tag posts at top

Rephrase question I need to order posts inside the loop for my category car. What I need, if I visit the category page of car, I need all posts tagged BMW to display first, and then the other posts ...
0
votes
1answer
32 views

How to order posts by the user_login that corresponds to a meta_value (which is a user id)?

I'm trying to create sortable column headers for a CPT list, but I'm stuck on one piece. When clicking on an "Assignee" column head, I want the list to display alphabetically by the login name of the ...
0
votes
2answers
113 views

Order get_terms using a Custom Field

I have a custom taxonomy of "crb_issues" that has a custom field associated with it that is "issue_date" which outputs a date value for each term to looks a lot like "20140601" yearmonthday. I am ...
1
vote
1answer
67 views

How to set order for a custom post type

I'm trying to integrate a slider custom post type into WordPress and I can't seem to set the order (orderby:ID, order:ASC) for that custom post type. I've added the supports => ...
1
vote
1answer
57 views

How to set multiple `orderby` in query argument?

I am trying to fetch pages by multiple ordering. menu_order in descending and title in ascending. Following is the argument: $args = array( 'post_type' => 'page', 'posts_per_page' => 20, ...
0
votes
1answer
65 views

Order posts by date and then by custom field

I am trying to do something like this one. Ordering posts by day (not time) AND meta value I want to list blog posts ordered by date (not time) and then within that day, I want to sort them by custom ...
1
vote
1answer
107 views

Ordering by meta_value AND date NOT WORKING with wp_query

I want to select posts and custom post type with a specific meta value (mb_home!=0), of last week and ORDER them by mb_home. If they have the same mb_home value, I want them to be ordered by date. ...
0
votes
1answer
58 views

orderby parameter not working in custom query

I have a really strange issue for a site I'm updating... All I want to do, is have it so that the posts come in descending order instead of random. I have the following code, but when you change it ...
0
votes
0answers
39 views

Auto order posts of custom post type by title

I have a custom post type which has more than 50 posts. I want to reorder them alphabetically so that each time I post anything the system automatically reorders. Please don't suggest post order ...
0
votes
1answer
140 views

Make a vertical dynamic list of posts in alphabetically order and in columns [closed]

I have a page that lists all the posts from a given category of an custom post type dynamically. I do this with a plugin that list posts and a shortcod and with css i created 9 columns where they are ...
0
votes
0answers
19 views

Re-order posts inside tax query

I have some posts having some custom fields and their value. I have custom fields like featured and expiry_date, whose values are yes/no and some date respectively. All these posts are coming under ...
0
votes
0answers
22 views

Sort WP Taxonomies

Is there a way to sort a custom taxonomy term list in order of recent updates to posts inside that taxonomy? Example: Custom Post Type: Research Custom Taxonomy: University Research Custom Tax ...
0
votes
0answers
80 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
1answer
40 views

Sorting posts by Multiple custom fields in defined order

I'm currently sorting some posts out by custom fields 'role' and 'surname', using the following: function customorder($orderby) { return 'mt1.meta_value DESC, mt2.meta_value ASC'; } $args = ...
0
votes
0answers
11 views

Is there easier way not to display all images attached on the page from media?

I'm thinking not to delete the images I attached on the page, but will just have conditions not to display images with order set to 0. If I have code like this: $thumbnail_ID = ...
0
votes
0answers
24 views

Order by post_type within loop

Envision the following: <?php $args=(array( 'post_type'=>array( 'premium_content', 'post'), 'posts_per_page' => 3, 'orderby' => 'PREMIUM_CONTENT_FIRST!', 'meta_query' => array( ...
0
votes
2answers
23 views

Order Custom Posts by Several Fields

I have a page that lists out the members of our band, as a custom post type. I am trying to order the members by several custom fields, field by category, or "section, then by their class, and then ...
0
votes
1answer
29 views

Where is the order of a menu saved in the database

I want to use a custom menu from the wordpress database but I get the elements disordered and I want them to have the same order how can i do that? There is a place in the database where the order is ...
0
votes
1answer
30 views

$args Orderby The number

I have this code $cat_args=array( 'include' => '42,210,21', 'orderby' => '42,210,21', 'order' => 'asc' ); $categories=get_categories($cat_args); foreach($categories as $category) { ...
0
votes
0answers
20 views

Is it possible to order a query on one taxonomy term by the terms in another, connected taxonomy?

I've seen the negative answer in this question, Using wp_query is it possible to orderby taxonomy?, but I think I have a valid use case for something similar that's less broad than in that previous ...
0
votes
2answers
74 views

Automatically set page order on create page

Is there a way to automatically set page order to the last order number upon creating new pages instead of having it set to 0?
0
votes
1answer
43 views

Apply ordering args to newly merged queried

I have two queries with arguments and then I merged them to form my new query - $wp_query. I would like to now apply arguments to the new query to show the merged pages/posts by meta_value_num. This ...
0
votes
1answer
267 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 ...
0
votes
2answers
62 views

How do I order pages and categories by ID or name in the same query?

I would like to query most of my pages and categories on the homepage. So far I am able to get the pages and category (posts), but I cannot order the list the way I want to. I want to be able to get a ...
0
votes
1answer
197 views

WP_Query order result by date AND meta_value

I have searched but not found an answer to my problem. I have posts with a meta key used for ordering. I want to order post by this value. If they have same value I want them to be ordered by date. I ...
0
votes
3answers
82 views

How Do I Order Posts by Modified Date? [duplicate]

I've read the codex article about WP_Query's orderby parameters and I understood that it is possible to order by Modified date. But I couldn't find where should I edit. How WordPress post order by ...
0
votes
0answers
30 views

Sub 'Page' Child Menu Order

I cannot seem to get the order of my sub-page Menu items in the correct order. They will only display in alpha or numerical order - even if I specify the menu order. To be clear - I am not referring ...