Title: Separate fields in template
Last modified: August 22, 2016

---

# Separate fields in template

 *  [guit4eva](https://wordpress.org/support/users/guit4eva/)
 * (@guit4eva)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/separate-fields-in-template/)
 * Hey guys,
 * Is it possible to output the fields separately via the page template? I need 
   to insert text in between each field, like this:
 * (dropdown) IN (dropdown)
 * Pretty basic, but I’ve been at it for 2 hours ha ha:)
 * Thanks in advance!!
 * [https://wordpress.org/plugins/ultimate-wp-query-search-filter/](https://wordpress.org/plugins/ultimate-wp-query-search-filter/)

Viewing 9 replies - 1 through 9 (of 9 total)

 *  Plugin Author [TC.K](https://wordpress.org/support/users/wp_dummy/)
 * (@wp_dummy)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/separate-fields-in-template/#post-5175418)
 * There are some workaround.
 * Depends on what type is your field, if it is taxonomy field you need to use `
   uwpqsf_tax_field_dropdown()`, and if it is meta field then you need to use `uwpqsf_cmf_field_dropdown()`
 * eg:
 *     ```
       add_filter('uwpqsf_tax_field_dropdown','add_text_between','');
       function add_text_between($html){
        if($taxname  == 'taxo1'){// if taxo1 is the taxonomy slug
        $html .= '<span>IN</span>'; //adding text here
        }
         //elseif if you multiple field that like to insert text
         return $html;
   
       }
       ```
   
 * Above code will become (dropdown[taxo1] ) IN (dropdown).
 *  Thread Starter [guit4eva](https://wordpress.org/support/users/guit4eva/)
 * (@guit4eva)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/separate-fields-in-template/#post-5175419)
 * Hey there:)
 * Unfortunately, when I place that in my functions.php file, I get the following
   error:
 * > Parse error: syntax error, unexpected ‘)’ in /var/www/find/wp-content/themes/
   > find/functions.php on line 210
 * My search is laid out like so:
 * Search all **Custom Post Type pages** in **Custom Taxonomy**
 *  Thread Starter [guit4eva](https://wordpress.org/support/users/guit4eva/)
 * (@guit4eva)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/separate-fields-in-template/#post-5175436)
 * Update: Sorry, that looks like it was an error on my part. Your code is working…
   almost:) I just need to do a bit more messing around on my end, but thanks so
   much! 🙂
 *  Thread Starter [guit4eva](https://wordpress.org/support/users/guit4eva/)
 * (@guit4eva)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/separate-fields-in-template/#post-5175437)
 * Update 2:)
 * Am I suppose to substitute $taxname with something? If I put
 * > if($taxname != ‘location’){// if taxo1 is the taxonomy slug
 * then it “works”, but obviously produced duplicates. “location” is definitely 
   the slug, so I’mg going wrong somewhere else…Do you have any idea?
 *  Plugin Author [TC.K](https://wordpress.org/support/users/wp_dummy/)
 * (@wp_dummy)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/separate-fields-in-template/#post-5175443)
 * Why don’t you use `==` instead of `!=`, because when you use `!=`, any taxonomy
   fields which is not ‘location’ will have the text appended.
 *  Thread Starter [guit4eva](https://wordpress.org/support/users/guit4eva/)
 * (@guit4eva)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/separate-fields-in-template/#post-5175447)
 * I was using != just to check that it’s working. But now I am trying to target
   the one field with ==, but it’s not working.
 * My custom type’s slug is ‘location’, which I used in the functions snippet with
   ==, but it’s not working for some reason :/
 *  Plugin Author [TC.K](https://wordpress.org/support/users/wp_dummy/)
 * (@wp_dummy)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/separate-fields-in-template/#post-5175458)
 * The above code only work for TAXONOMY field, not for custom post type.
    Where
   does the post type come from??
 *  Thread Starter [guit4eva](https://wordpress.org/support/users/guit4eva/)
 * (@guit4eva)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/separate-fields-in-template/#post-5175459)
 * It’s a custom post type made with WP-Types
 *  Plugin Author [TC.K](https://wordpress.org/support/users/wp_dummy/)
 * (@wp_dummy)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/separate-fields-in-template/#post-5175484)
 * By default, the custom post type will not displayed at the search form. How you
   get the post type in the search form?

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘Separate fields in template’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/ultimate-wp-query-search-filter_fcfcfc.
   svg)
 * [Ultimate WP Query Search Filter](https://wordpress.org/plugins/ultimate-wp-query-search-filter/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/ultimate-wp-query-search-filter/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/ultimate-wp-query-search-filter/)
 * [Active Topics](https://wordpress.org/support/plugin/ultimate-wp-query-search-filter/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/ultimate-wp-query-search-filter/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/ultimate-wp-query-search-filter/reviews/)

## Tags

 * [template](https://wordpress.org/support/topic-tag/template/)
 * [UWPQSF](https://wordpress.org/support/topic-tag/uwpqsf/)

 * 9 replies
 * 2 participants
 * Last reply from: [TC.K](https://wordpress.org/support/users/wp_dummy/)
 * Last activity: [11 years, 9 months ago](https://wordpress.org/support/topic/separate-fields-in-template/#post-5175484)
 * Status: not resolved