Ordering items

I am using Zotpress to retrieve a set of items and display them on a web site with a custom style. How do I get Zotero to use the sort order specified in the style?

I have set up the style to sort on the Zotero “Extra” field since that appears in all the Zotero item types. The “Extra” field is mapped to the CSL “note” variable, so the style (in theory) sorts on that. I’m assuming that the style then serves the items in that order. If so, then all I need is to be able to tell Zotero to display them in the order it receives them.

I have talked with Katie Seaborn, the author of Zotpress, but she didn't know how to accomplish this. She thought that Zotero retrieved the items in whatever order it does regardless. But that doesn't make much sense. What's the point of a CSL sort specification if it can't be used? While I appreciate that CSL and Zotero are - as the CSL site puts it - independent open source projects - there is also a long and close connection between the two, as the site also notes.

Can anyone help?

Here’s the link to the CSL style file:


Here’s a test page using this style:


Here’s the zotpress shortcode used on the page:

[zotpress collection=”F6X6F522″ tags=”test” showtags=”no” urlwrap=”title” abstract=”yes” style=”http://www.riverbendadvisors.com/blog/wp-content/uploads/2019/08/site-resource-list-new.csl” highlight:”Abstract” ]

And here's a link to the conversation with Katie in the Zotpress forum on wordpress.org:



  • edited August 7, 2019
    I'm not sure what Katie means by that, but the Zotero API can certainly return a bibliography in the sort order specified by the style, and an external style URL can be given. For bibliography responses, there can only be 150 matching items (because paging doesn't work in the context of style-specified sorting).

    If you have a public group, you can see an example with a URL like this:

    https://api.zotero.org/groups/[REPLACE WITH GROUP ID]/items?format=bib&style=http%3A%2F%2Fwww.riverbendadvisors.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F08%2Fsite-resource-list-new.csl
  • Thanks, Dan. That does seem to work. I added the items I'm using for the test page - which have entries in the CSL note/Zotero Extra field - to a public group I had previously created for testing - 916124. The four items I have entries for in the "Extra" field are sorted at the top, as expected.

    Below that are listed other items in the group library along with what I believe are the sub-items (i.e. attachments and notes) of the items in the library. I assume those could be suppressed, but that's a separate issue.

    I will reach out to Katie (by adding a pointer to this conversation to our thread on the Zotpress forum) to follow up. Given this proof of concept, I'm hoping she can figure out how to make the corresponding request from within Zotpress (and will be willing & able to make it available :-) ).
Sign In or Register to comment.