• Hello –

    I’m trying to create a search feature on our website that probably should have been done using a database. But it was done by a previous developer using Advanced Custom Fields. I’m still learning my way around WP and Custom Fields so forgive my ignorance. Here is what was created.:

    Field Label: Garage Type
    Field Name: garage_type
    Field Type: Checkbox
    Options: about 12 option listed

    I need to be able to list this options on a page, then be able to check multiple boxes, and have them search through a bunch of plans which are also made up of custom field. The plans are in the database, but it looks like they are entered via the custom fields. Here is what I have so far – but it only shows 3 check boxes – I’d put up a screenshot but dont’ see any way to do that – sorry.

    Appreciate some help – I’m really in bind here.
    Thanks in advance.

    https://ww.wp.xz.cn/plugins/advanced-custom-fields/

Viewing 1 replies (of 1 total)
  • Thread Starter Jethro99

    (@jethro99)

    Now I can get a “partial” dump of the array – it seems to pull every 4th item in the array. Why is that? here is my code – it was taken directly from the AFC resources.

    $special_feature = ”;
    $special_features = ”;
    echo ‘<h5>Special Features</h5>’;
    $special_features = get_field(‘special_features’);
    if($special_features)
    {
    echo’

      ‘; foreach($special_features as $special_feature)
      {
      echo ‘

    • ‘ . $special_feature . ‘
    • ‘;
      }
      echo ‘

    ‘;
    }
    }

Viewing 1 replies (of 1 total)

The topic ‘Search feature’ is closed to new replies.