Title: [Plugin: Simple Fields] to help others with using simplefields
Last modified: August 20, 2016

---

# [Plugin: Simple Fields] to help others with using simplefields

 *  [sguk](https://wordpress.org/support/users/sguk/)
 * (@sguk)
 * [14 years, 9 months ago](https://wordpress.org/support/topic/plugin-simple-fields-to-help-others-with-using-simplefields/)
 * This is how to use simplefields for download links
 *     ```
       <?php $selected_values = simple_fields_get_post_group_values(get_the_id(), "Download link", false,2);
       foreach($selected_values as $value){;
       echo '<div class="downloadtitle">' .( $value[4] ). '</div>';
       echo '<a href="' .wp_get_attachment_url( $value[2] ). '">'.( $value[1] ).'</a>';
       }?>
       ```
   
 * what’s going on here?
    This is a simplefields repeatable group which consists
   of a download title such as “download our brochure below”, a download title which
   is the actual link text and a link to the attachment.
 * the 3 values are the meta data which simple fields generates.
    value 1 is a text
   field value 2 is a file upload value 3 is a text field
 * Additionally, separate from simplefields, you can add file icons by using css
   code similar to this
    a[href$=’.doc’], a[href$=’.DOC’], a[href$=’.docx’], a[href
   $=’.DOCX’] { background:transparent url(/images/MIcrosoft-icon.png) center left
   no-repeat; display:inline-block; padding-left:25px; line-height:18px; }
 * This will add icons next to your links without the need for javascript.
    I get
   alot of resources from the internet and I am extremely grateful for those who
   write and share code. I hope this helps others.
 * [http://wordpress.org/extend/plugins/simple-fields/](http://wordpress.org/extend/plugins/simple-fields/)

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

 *  Thread Starter [sguk](https://wordpress.org/support/users/sguk/)
 * (@sguk)
 * [14 years, 9 months ago](https://wordpress.org/support/topic/plugin-simple-fields-to-help-others-with-using-simplefields/#post-2268413)
 * sorry it keeps stripping my code***corrected now***
 *  Plugin Contributor [Pär Thernström](https://wordpress.org/support/users/eskapism/)
 * (@eskapism)
 * [14 years, 9 months ago](https://wordpress.org/support/topic/plugin-simple-fields-to-help-others-with-using-simplefields/#post-2268470)
 * Great example! Thanks for sharing.

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

The topic ‘[Plugin: Simple Fields] to help others with using simplefields’ is closed
to new replies.

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

 * 2 replies
 * 2 participants
 * Last reply from: [Pär Thernström](https://wordpress.org/support/users/eskapism/)
 * Last activity: [14 years, 9 months ago](https://wordpress.org/support/topic/plugin-simple-fields-to-help-others-with-using-simplefields/#post-2268470)
 * Status: not resolved