WordPress.org

Forums

WP-Table Reloaded
Searching hidden columns (2 posts)

  1. philipt18
    Member
    Posted 3 years ago #

    Is there a way to makes hidden columns searchable? I want to create a column with keywords and alternate version of certain words to insure people find what they're searching for.

    If not, I'd like to request that for a future version...

    Thanks.

    http://wordpress.org/extend/plugins/wp-table-reloaded/

  2. TobiasBg
    Member
    Plugin Author

    Posted 3 years ago #

    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

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WP-Table Reloaded
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic