WordPress.org

Support

Support » Plugins and Hacks » [Plugin: WP-Table Reloaded] Searching hidden columns

[Plugin: WP-Table Reloaded] Searching hidden columns

Viewing 1 replies (of 1 total)
  • Plugin Author TobiasBg

    @tobiasbg

    Hi,

    thanks for your question.

    Which search are you talking about here? The regular WordPress site search, or the search field that shows up right above a table?

    And with hidden columns, you mean those that you hid on the table’s “Edit” screen (i.e. which appear in red there)?

    If you mean the regular site search: Making hidden columns searchable here is not really an option. Usually people hide the content with the purpose that it is not publicly visible on the page, which is why it should not turn up in search results either.

    If however, you are talking about the search field right above the table: You could actually use a function in the “DataTables JavaScript library” (which does this search) to hide a column on a page (i.e. when the table is displayed, and not already when editing it).

    However, the best option for your use case is probably a solution based on CSS:
    Just add those words that you want to hide in an additional container, that gets a CSS class that will hide that container. For example, you could add

    .wp-table-reloaded span.hidden {
      display: none;
    }

    to the “Custom CSS” and then add something like

    <span class="hidden">This content will not be visible, but searchable.</span>

    to your (not-hidden) column. (Attention: Don’t add a line break before the <span>.)

    Best wishes,
    Tobias

Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: WP-Table Reloaded] Searching hidden columns’ is closed to new replies.