Sort articles via link

Asked

Viewed 24 times

0

wordpress has a system where you sort how many files should appear on the home page, Categories etc.

It would be possible to sort the amount of files through the browser link?

Here we have a part of a link that shows articles in alphabetical order

                ?orderby=title&order=asc

Is there any code that if added in the above code would show how many articles I want?.

Example: ? orderby=title&order=asc 20 articles

1 answer

0

I believe you can do this, posts_per_page (n = number of records), and offset (n = how many records you will skip):

?orderby=title&order=asc&posts_per_page=n&offset=n

  • It didn’t work, but thanks for answering

  • This is for posts, for files, it will depend on the module you are using.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.