Support » Plugin: Simple Fields » How can I call these fields value on a them template..

  • Resolved Sudhanshu Dubey



    I found this plugin good but somewhere I got stuck ..Like you didn’t mentioned that how can people can call on post,page or even on the template file of theme.Like as for now I have created two many images and made two section repeatedly.and again putted many images in that.Now what I need how to call on template in a loop so that they all could be visible on my front page coming through a template..

    Before of this I have asked another question.Please take me out from this problem..


Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Pär Thernström


    Yes, the documentation is lacking in some areas. Sorry about that..

    One simple way to add your images to your posts on the front end is to modify your functions.php and add something similar:

    function add_simple_fields_to_content($content) {
    	$images = simple_fields_values('your_images_slug');
    	if ( empty( $images ) ) return $content;
    	foreach ($images as $image_id) {
    		$content .= sprintf(
    			wp_get_attachment_image($image_id, NULL, TRUE)
    	return $content;
    add_action("the_content", "add_simple_fields_to_content");

    You may have to modify it a bit to suit your needs, but it should be a good starting point. Good luck!

    Hi Pär Thernström,

    I am a new in WordPress,But I think you didn’t addressed my requirements properly as what I need is:
    1.Multiple group of slection at a time that contains different fields on a single post.Like I have made two groups
    1.single->contains some fields
    2.Doulble->conteins some different fields.

    I want to show both group fields at a time on a single post.

    2.How can I call all fields values on a template not only image field but all fields values and I can’t use featured image option in this ..Please help me.


    I got the solution thanks!!

    you will get all the stuffs from here :

    Simple Fields tutorial, part 2: getting the values

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How can I call these fields value on a them template..’ is closed to new replies.