Automatically sort post in alphabetical order
-
Hi all, I am new about WordPress.com and I hope that it is the correct section to ask this question. The question is:
There is a way to sort all private post automatically in alphabetical order?
I know a little bit about the shortcode and I try to use this one, in a new empty post, unsuccessful:
[display-posts posts_per_page="-1" orderby="title" include_content="true"]Where is the mistake?
There are other ways to solve my problem?
Thank you! -
-
Hi @psodpa!
The code you’ve shown should work – it’s listing the posts, but backwards, correct?
You can reverse the order of the listing with order=”ASC” (ASC is short for Ascending).
Like this:
[display-posts posts_per_page="-1" orderby="title" include_content="true" order="ASC"]You mentioned private posts in your question – there isn’t a parameter for the shortcode to pull in just private posts, no. You can limit other ways, like a Category though. Maybe put all of your private posts in a special category, and have the shortcode display that? :)
my question is it too hard or I am in the wrong place?
Your question was in the right place. If it isn’t noticed initially and you need staff help, you can always add the modlook tag in the sidebar :)
-
Hi staff-loquaciousloon,
thank you for your answer but unfortunately all my shortcode don’t work.
I also created a new post with your shortcode but unfortunately doesn’t work (And I don’t understand why).
Maybe I forgot something; remember I am new of wordpress.com.
Thank you -
I’d be happy to take a look at what you have :)
I don’t see the shortcode anywhere on your site at the moment, can you post a link to the post or page that you’ve added it to?
-
Hi staff-loquaciousloon,
the code work only for public post; I set the post public so after I wile the shortcode works.Unfortunately after every change on every post the update is very slow. For example, I deleted a post but I can still see it in the “shortcode post”.
Is it normal? -
-
Hi @psodpa!
The short code goes through a bit of caching on this end, so there can sometimes be a bit of a delay in the results of the code updating, yes.
-
Hi staff-loquaciousloon,
first of all, thank you for your answers. They are very helpful.This shortcode is a nice trick for what I have to do. Unfortunately this isn’t a solution for me and I cannot wait 12-24 hours (I checked).
There is the possibility to change the time between every “update”? Maybe with an upgrade to an annual subscription?
One more thing: there is a possibility to insert a block of code inside a post with hylang syntax?
Thank you, Lorenzo -
My pleasure!
The Display Posts Shortcode does have a delay – it’s usually about an hour. At that point new posts will appear on the shortcode, and any deleted posts will be removed.
If you don’t see the new posts after an hour or so, try clearing your browser cache :)
- The topic ‘Automatically sort post in alphabetical order’ is closed to new replies.