Title: Custom fields separator
Last modified: August 22, 2016

---

# Custom fields separator

 *  [Dani](https://wordpress.org/support/users/danicasati/)
 * (@danicasati)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/custom-fields-separator/)
 * Hi.
    If I’m using :
 * customfield_display_name=no customfield_display=field1,field2
 * the result is that 2 fields value are displayed in same line, without any separation.
 * Is it possible to add to a shortcode a custom separation for custom fields?
    
   It would be nice to add text or HTML tags too.
 * [https://wordpress.org/plugins/list-category-posts/](https://wordpress.org/plugins/list-category-posts/)

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

 *  [AACT](https://wordpress.org/support/users/aact/)
 * (@aact)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/custom-fields-separator/#post-5527322)
 * Hi,
    I hacked include/lcp-catlist.php (or CatList.php depending on which version
   you are using) to put in a span around each customfield. Of course you could 
   add whatever HTML you like.
 * In lcp-catlist look for where it adds the field to the output string:
 *  if ($this->params[‘customfield_display_name’] != “no”)
    $lcp_customs .= $user_customfield.”:“;
   $lcp_customs .= $value;
 * and just concatenate whatever HTML strings you want before and after $value in
   that third line.
 * Not pretty to have to alter the plugin code but it works.
    If there’s a more 
   standard way to do it I’d be pleased to hear.
 *  Thread Starter [Dani](https://wordpress.org/support/users/danicasati/)
 * (@danicasati)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/custom-fields-separator/#post-5527351)
 * It would be better to add customized separators and labels by shortcodes?
    Is
   this possible?
 *  [AACT](https://wordpress.org/support/users/aact/)
 * (@aact)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/custom-fields-separator/#post-5527367)
 * Hi, as far as I can see there is no way of doing this at the moment.
 * You could define extra parameters (e.g. xxxx_tag) for the shortcode I guess and
   then put them round each customfield value.
 * However, I do it the way I do it because I want to create the class dynamically
   depending on each field’s name so it has to be done at run time.

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

The topic ‘Custom fields separator’ is closed to new replies.

 * ![](https://ps.w.org/list-category-posts/assets/icon-256x256.png?rev=2517221)
 * [List category posts](https://wordpress.org/plugins/list-category-posts/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/list-category-posts/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/list-category-posts/)
 * [Active Topics](https://wordpress.org/support/plugin/list-category-posts/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/list-category-posts/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/list-category-posts/reviews/)

## Tags

 * [customfield](https://wordpress.org/support/topic-tag/customfield/)

 * 3 replies
 * 2 participants
 * Last reply from: [AACT](https://wordpress.org/support/users/aact/)
 * Last activity: [11 years, 6 months ago](https://wordpress.org/support/topic/custom-fields-separator/#post-5527367)
 * Status: not resolved