Ordering of guides on doc site

As an aside, I think we also need to have a way of ordering the published CPTs as they seem to only be in post_id order.

2 Likes

Are you thinking alphabetical order or something more sophisticated?

I was thinking something more sophisticated; like with pages where you can set an order.

That can be done with posts too, but what would the order be based on?

Preference of those creating the pages, I guess.

I thought of it when adding the plugin guidelines; if I could have set them it would have been Guidelines, Submission, Review, Adoption, Vulnerability Reporting.

It might not be something that would work more widely though (thinking of user/developer guideline sections).

I have done this on many sites where categories reflect either chapters or issues of a publication, and then posts are the pages within a chapter or articles within each issue. But I’m not sure how that would apply for our guides.

Me too when I thought about it more outside of the plugin side.

Just to be clear, you can already order those docs - however only hardcoded in the backend.
Just pass the desired orderby and order argument to the ShortCode (or let me know how you’d like to order).
Example:
order="DESC" orderby="menu_order"
Now set a menu order number in each of your docs to determine the precise order you want.
You can pass any valid WP Query order and orderby string argument (no arrays, of course)

However, I did understand you where asking for a front end order and sort by feature. That, is another story. This requires user input, to an URL parameter, which then gets read by code. This cannot be done that quickly (as explained in slack) mainly because it requires careful safety measures and also I have to think about how to do this both on the fly and on page reload respectively.

But if the only goal for now is a hardcoded backend ordering that forces those docs onto a certain order, you can do so.

Could we split this thread into a separate one to proceed? Because it is really about the proper content categorisation :stuck_out_tongue: and was “resolved” here Proper content type and "categorisation" - #19 by anon66243189 (I did not even know we can continue discussion on resolved threads)

The key to effective and speedy implementation of things is the old and boring “one thing a time”, which heavily applies to “tickets” too haha.
(My old supporter nature loves to say “please open a new ticket for the new add-on issue”)

I’ve split my “aside” off to a different thread as it was a diversion from the original topic which I hadn;t expected to grow like that.

This came up because menu order isn’t available in the Plugin Guidelines CPT.

1 Like

My bad!
Truly the CPT for guides is not featuring the page support.
We’ve to add it, then we can use what I mentioned prior.

For now thus you can only orderby native WP standard post data such as title, date, modified, id.

If I ever get server access, I can make those changes myself. If not, We can batch it to James.

2 Likes

@azurecurve I have added support for menu order and also post edit table list can now be ordered by menu_order, apart of course, the actual front end now also will work when you pass order=“ASC” orderby=“menu_order” to the shortcode (done already for plugin guidelines)

Let me know if this resolves the issue.

The new menu order support applies to all 3 plugin guidelines, user guides and developer guides.

3 Likes

5 posts were split to a new topic: Order of User and Developer Guides

I’ve split off the discussion on ordering of user and developer guides as it is a different topic.

2 Likes