Title: [Plugin: Simple Fields] Fields not being called after custom loop query
Last modified: August 19, 2016

---

# [Plugin: Simple Fields] Fields not being called after custom loop query

 *  Resolved [phantomdentist](https://wordpress.org/support/users/phantomdentist/)
 * (@phantomdentist)
 * [15 years, 5 months ago](https://wordpress.org/support/topic/plugin-simple-fields-fields-not-being-called-after-custom-loop-query/)
 * Hi, awesome plugin. When call simple fields fields after a custom loop query 
   the do not work, not called I assume. With the custom loops removed from above
   they work fine.
 * Below are the custom loops (which are in the header) follow by the custom field
   calls which are in a custom page template)
 *     ```
       <div class="panes-banner">
                           <?php
       							$query = 'post_type=banner-slider&showposts='.$theme_options_banner_number_of_sliders.'&orderby=menu_order&order=ASC';
       							$queryObject = new WP_Query($query);
       							// The Loop...
       							if ($queryObject->have_posts()) {
       								while ($queryObject->have_posts()) {
       									$queryObject->the_post();
       							?> 
   
               					<div>
       								<h2><a class="banner-link" href="<?php the_permalink(); ?>"> <?php the_title(); ?> </a></h2>
                                       <?php the_content(); ?>
       							</div>
       							<?php
       								}
       							}
       							?>
                       </div>
   
                                         <!-- the tabs -->
                       <ul class="tabs-banner">
                          <?php
       							$query = 'post_type=banner-slider&showposts='.$theme_options_banner_number_of_sliders.'&orderby=menu_order&order=ASC';
       							$queryObject = new WP_Query($query);
       							// The Loop...
       							if ($queryObject->have_posts()) {
       								while ($queryObject->have_posts()) {
       									$queryObject->the_post();
       							?>
   
       								<li><a class="banner-link" href="#"> </a></li>
   
       							<?php
       								}
       							}
       							?>
                       </ul>
       ```
   
 *     ```
       <div class="home-website-design-section margin-right-80">
               <h2>Website Design</h2>
               <?php $website_design_blurb = simple_fields_get_post_value(get_the_id(), array(1, 1), true);
                   echo "<span class='meta-value_website_design_blurb'>$website_design_blurb</span>";?>
               </div><!-- end home-website-design-section -->
   
               <div class="home-graphic-design-section">
               <h2>Graphic Design</h2>
               <?php $graphic_design_blurb = simple_fields_get_post_value(get_the_id(), array(1, 2), true);
                   echo "<span class='meta-value_graphic_design_blurb'>$graphic_design_blurb</span>";?>
               </div><!-- end home-graphic-design-section -->
   
               <div class="home-multimedia-section margin-right-80">
               <h2>Multimedia</h2>
               <?php $multimedia_blurb = simple_fields_get_post_value(get_the_id(), array(1, 3), true);
                   echo "<span class='meta-value_multimedia_blurb'>$multimedia_blurb</span>";?>
               </div><!-- end home-multimedia-section -->
   
               <div class="home-internet-marketing-section">
               <h2>Internet Marketing</h2>
               <?php $internet_marketing_blurb = simple_fields_get_post_value(get_the_id(), array(1, 4), true);
                   echo "<span class='meta-value_internet_marketing_blurb'>$internet_marketing_blurb</span>";?>
               </div> <!-- end home-internet-marketing-section -->
       ```
   
 * [http://wordpress.org/extend/plugins/simple-fields/](http://wordpress.org/extend/plugins/simple-fields/)

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

 *  Plugin Contributor [Pär Thernström](https://wordpress.org/support/users/eskapism/)
 * (@eskapism)
 * [15 years, 5 months ago](https://wordpress.org/support/topic/plugin-simple-fields-fields-not-being-called-after-custom-loop-query/#post-1804786)
 * Hi, can you try this:
    Before your custom loop, add this:
 * —-
 * $post_org = $post;
 * —
 * And then after the custom loops, before the first call to simple fields add this:
 * —
 * $post = $post_org;
    setup_postdata($post);
 * —
 *  Thread Starter [phantomdentist](https://wordpress.org/support/users/phantomdentist/)
 * (@phantomdentist)
 * [15 years, 5 months ago](https://wordpress.org/support/topic/plugin-simple-fields-fields-not-being-called-after-custom-loop-query/#post-1804818)
 * Did the trick nicely mr P, thank you very much for your help.

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

The topic ‘[Plugin: Simple Fields] Fields not being called after custom loop query’
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: [phantomdentist](https://wordpress.org/support/users/phantomdentist/)
 * Last activity: [15 years, 5 months ago](https://wordpress.org/support/topic/plugin-simple-fields-fields-not-being-called-after-custom-loop-query/#post-1804818)
 * Status: resolved