• Mark

    (@codeispoetry)


    When using a shortcode like this:

    [zotpress collection="3NFG95L9" title="year" order="desc"]

    ZotPress starts with the most recent year and lists items with no date at the very bottom. However, in my library (and I suspect in many) such items are forthcoming or in press, and so we’d want them at the top; and we’d want the heading to say something like “In press” rather than “No date”.

    I am sure you can think of a nice way to fix this, but I also recognise this may be an edge case you may be unable to priorise. So I thought of a workaround and am posting it here in case others need a solution to this issue:

    Workaround

    1. Hide the “No date” entries
    Add the following code to your custom CSS or to your (child) theme’s CSS file. This hides the inserted heading and the items that follow it.

    
    h3[rel="0000"], h3[rel="0000"] ~ div.zp-Entry {
    	display:none;
    }
    

    2. Add “In press” and a shortcode for the hidden items in a location of your choosing

    <h3>In press</h3>
    [zotpress year="0000" order="desc"]
    

    Caveat: this seems to work on my end, but I am not entirely sure whether the CSS sibling selector will always work as expected. As a workaround, it also invokes ZotPress twice, adding to loading time.

    • This topic was modified 5 years ago by Mark.
    • This topic was modified 5 years ago by Mark.
  • The topic ‘Customize order and heading of “No date” entries (includes workaround)’ is closed to new replies.