Title: [Plugin: Magic Fields] Group fields, only if exists
Last modified: August 19, 2016

---

# [Plugin: Magic Fields] Group fields, only if exists

 *  [pmbs](https://wordpress.org/support/users/pmbs/)
 * (@pmbs)
 * [15 years, 1 month ago](https://wordpress.org/support/topic/plugin-magic-fields-group-fields-only-if-exists/)
 * Hello,
 * Great plugin, need some help though. Im using the following code for displaying
   content out of a group (which can be duplicated):
 *     ```
       <div id="omtaleboks">
       <div id="omtaler-tittel"><?php echo get('omtaler_nettsted',3); ?></div>
       <div id="omtaler-score"><?php echo get('omtaler_score',3); ?></div>
       <div id="omtaler-tekst"><?php echo get('omtaler_tekst',3); ?></div>
       <div id="omtaler-url"><a href="<?php echo get('omtaler_url',3); ?>">Read more »</a></div>
       </div>
       ```
   
 * This gives me a styled box with the information I need.
    I will need to have 
   a different amount of these boxes on my site, in a amount of 1-15. Is there any
   code I can use so those boxes only will display if there is added content to 
   the id? Like, box 5-15 will be hidden if I only duplicated the group 4 times.
 * Hope you understood that 🙂

The topic ‘[Plugin: Magic Fields] Group fields, only if exists’ is closed to new
replies.

 * ![](https://s.w.org/plugins/geopattern-icon/magic-fields.svg)
 * [Magic Fields](https://wordpress.org/plugins/magic-fields/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/magic-fields/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/magic-fields/)
 * [Active Topics](https://wordpress.org/support/plugin/magic-fields/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/magic-fields/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/magic-fields/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [pmbs](https://wordpress.org/support/users/pmbs/)
 * Last activity: [15 years, 1 month ago](https://wordpress.org/support/topic/plugin-magic-fields-group-fields-only-if-exists/)
 * Status: not resolved