Support » Developing with WordPress » No blank line between bulk actions and table without pagenav

  • Question:

    I output table, with bulk actions, using a class derived from WP_List_Table. I notice that one difference between how my view is rendered compared to, say, a standard WordPress table, like the Media list, is that between the “Bulk actions” dropdown, and the top of the table, there’s no space (blank line, whatever).

    Looking at the output, I noticed that display_tablenav() of WP_List_Table emits:

    <br class="clear" />

    Since there’s no pagination output in my case, this doesn’t seem to happen. Instead I’m left with the output of:

    "\n"

    Which obviously doesn’t do much for spacing 🙂

    I’m assuming I’m doing it wrong and that this is entirely intentional?

    • This topic was modified 2 months, 3 weeks ago by joho68.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator bcworkz

    (@bcworkz)

    display_tablenav() would still output an item count even if there is no pagination. It unconditionally outputs the clear break afterwards. If you’re not getting the clear break, I would guess that you’ve overridden something which prevents display_tablenav() from behaving as we would expect.

    Thread Starter joho68

    (@joho68)

    Hmm … it seems like if I don’t sent total items, or any of the data used by the pagination, it’s not output (the clear break). I can check in a few hours to see if that is what’s happening.

    I found one situation where it wouldn’t be set, so that may very well have been the issue.

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.