• Resolved dbengston

    (@dbengston)


    I’ve read the post/tutorial on how to create a custom layout in the form of an HTML table (https://displayposts.com/2019/03/18/display-results-as-a-table/), but I’d like to come up with a simpler method for rendering small bits of each post as a table row for a TOC.

    Is there a tutorial for adding an item (table) to the “approved” values for the wrapper param? I would then just use a very simple partial to generate each post as a table row.

    This is a great plugin, and I use it to do amazing things. Thank you so much for making it, and maintaining it so well.

    Dale

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Bill Erickson

    (@billerickson)

    Unfortunately no, the list of approved values is hardcoded to ul, ol, and div (see here).

    But you can override the wrapper output completely using the display_posts_shortcode_wrapper_open and display_posts_shortcode_wrapper_close filters, which is how the table tutorial is done.

    Thread Starter dbengston

    (@dbengston)

    I considered that, but then I’d have to except it for just one use case. I have other places on the same site where <div> works just fine as a wrapper.

    I’ll see what I can come up with. Thanks again,
    Dale

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Add table to valid wrapper values and use partials to generate table rows’ is closed to new replies.