• Hello, great plug in! I am new to PHP, please bear with me.

    So basically, I want to create a custom search with multiple dropdown menus. This website does exactly what I’m referring to http://www.pacproperties.com

    I have several property listings and would like the ability to search them by CITY (Los Angeles, Long Beach, etc) and # of bedrooms (studio, 1,2) and pets ( checkbox yes/no)

    I created a /wp-content/themes/YOUR_THEMES/templates/pdb-list-detailed.php template, and have read all the forums and documentation, but now I am at complete loss what to do next.

    here is the code from the pdb-list-detailed.php template:

    <?php if ( $filter_mode == 'filter' || $filter_mode == 'both' ) : ?>
    
        <fieldset class="widefat">
          <legend><?php _e('Search', 'participants-database' )?>:</legend>
    
          <?php
            /*
             * there are 4 options for this function which defines which fields will be
             * available in the search dropdown selector:
             *    1. "all fields" text: set the text of the default "all fields" item:
             *       leave it "false" to use the internationalized defualt
             *    2. print it or return the element as a value: only use this if you
             *       need to alter the HTML directly. You will need to print the item for
             *       it to be seen. If 'true', the function prints the selector dropdown.
             *    3. columns: supply an array of column names if you want to define the
             *       list of fields that can be used for searching: 'false' uses all displayed
             *       fields
             *    4. sorting: you can choose to sort the list by 'column' (the order they
             *       appear in the table), 'alpha' (alphabetical order), or 'order' which
             *       uses the defined group/field order
             */
            $this->column_selector( false, true, false, 'column' );
          ?>
    
          <?php $this->search_form() ?>
    
        </fieldset>
        <?php endif ?>
        <?php if ( $filter_mode == 'sort' || $filter_mode == 'both' ) : ?>
    
        <fieldset class="widefat">
          <legend><?php _e('Sort by', 'participants-database' )?>:</legend>
    
          <?php
          /*
           * this function sets the fields in the sorting dropdown. It has two options:
           *    1. columns: an array of field names to show in the sorting dropdown. If
           *       'false' shows default list of sortable fields as defined
           *    2. sorting: you can choose to sort the list by 'column' (the order they
           *       appear in the table), 'alpha' (alphabetical order), or 'order' which
           *       uses the defined group/field order
           */
          $this->set_sortables(false, 'column');
          ?>
    
          <?php $this->sort_form() ?>
    
        </fieldset>
        <?php endif ?>
    
      </div>
      <?php endif ?>
    
    <?php
      /* END SEARCH/SORT FORM */



    [Please use the code buttons when posting code here]

    how can I edit this code to make it have multiple search dropdowns?

    I have read all the forums and the thing on creating custom templates here and I am so LOST!

    also, are there any great php websites out there for absolute beginners? Thanks in advance!

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

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Created Custom Template [pdb_List] now what?’ is closed to new replies.