WordPress.org

Ready to get started?Download WordPress

Forums

Participants Database
Search form options (2 posts)

  1. Rics
    Member
    Posted 1 year ago #

    Hello,

    My results list have 4 columns, but I want to let people search just for one of these, not every 4 of them.

    Is there a way to limit to one column in search form, but still present the results with 4 columns?

    http://wordpress.org/extend/plugins/participants-database/

  2. xnau
    Member
    Plugin Author

    Posted 1 year ago #

    Rics,

    OK, this is how you do that. Create a custom template for your list by copying /participants-database/templates/pdb-list-default.php to wp-content/themes/YOUR_THEME/templates/pdb-list-default.php

    In that file, you'll find a line: $this->show_search_sort_form();

    Replace that with this:

    $temp = $this->display_columns;
      $this->display_columns = array('first_name');
      $this->show_search_sort_form();
      $this->display_columns = $temp;

    Where it has array('first_name') put in the name of the fields you want your users to be able to search.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic