Title: leoland's Replies | WordPress.org

---

# leoland

  [  ](https://wordpress.org/support/users/leoland/)

 *   [Profile](https://wordpress.org/support/users/leoland/)
 *   [Topics Started](https://wordpress.org/support/users/leoland/topics/)
 *   [Replies Created](https://wordpress.org/support/users/leoland/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/leoland/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/leoland/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/leoland/engagements/)
 *   [Favorites](https://wordpress.org/support/users/leoland/favorites/)

 Search replies:

## Forum Replies Created

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

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Restricted Site Access] Version 7.0 and infinite redirects.](https://wordpress.org/support/topic/version-7-0-and-infinite-redirects/)
 *  Thread Starter [leoland](https://wordpress.org/support/users/leoland/)
 * (@leoland)
 * [7 years, 8 months ago](https://wordpress.org/support/topic/version-7-0-and-infinite-redirects/#post-10663191)
 * Hey [@qroberts](https://wordpress.org/support/users/qroberts/) this is currently
   being fixed (thank you Helen) and my guess is it won’t be long before it is added
   to the plugin in the wordpress repo. in the meantime. Using 6.2.1 does not have
   the issue or you can use grab the fix right form github repo [https://github.com/10up/restricted-site-access/pull/54](https://github.com/10up/restricted-site-access/pull/54)
   if that’s up your alley.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[All-in-One WP Migration and Backup] Stucks at Restoring Database](https://wordpress.org/support/topic/stucks-at-restoring-database/)
 *  [leoland](https://wordpress.org/support/users/leoland/)
 * (@leoland)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/stucks-at-restoring-database/#post-6306524)
 * **update**:
    +1 on using version 3.3…
 * Same problem using version 4.0, all files are uploaded but database is wiped 
   clean and it hangs on restoring.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Custom Field Suite] Url Field](https://wordpress.org/support/topic/url-field-1/)
 *  Thread Starter [leoland](https://wordpress.org/support/users/leoland/)
 * (@leoland)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/url-field-1/#post-5782045)
 * Ah, I am using the link to enclose a bunch of other content so this works for
   now but i am definitely playing with the new field. that would explain why the
   the url addon (i thought I had imagined it) disappeared.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Custom Field Suite] Loop field not outputting images](https://wordpress.org/support/topic/loop-field-not-outputting-images/)
 *  Thread Starter [leoland](https://wordpress.org/support/users/leoland/)
 * (@leoland)
 * [11 years, 12 months ago](https://wordpress.org/support/topic/loop-field-not-outputting-images/#post-4930368)
 * Cool beans, every frustrating experience is something I get to add to my small
   but grows list of knowledges.
 * RESOLVED.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Custom Field Suite] Loop field not outputting images](https://wordpress.org/support/topic/loop-field-not-outputting-images/)
 *  Thread Starter [leoland](https://wordpress.org/support/users/leoland/)
 * (@leoland)
 * [11 years, 12 months ago](https://wordpress.org/support/topic/loop-field-not-outputting-images/#post-4930362)
 * Yup that did it.
 * So in general when I do a:
    $the_query = new WP_Query($things) Should I i be 
   resetting post data as good practice? or simply keep it under my hat as a debug
   option?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Custom Field Suite] Loop field not outputting images](https://wordpress.org/support/topic/loop-field-not-outputting-images/)
 *  Thread Starter [leoland](https://wordpress.org/support/users/leoland/)
 * (@leoland)
 * [11 years, 12 months ago](https://wordpress.org/support/topic/loop-field-not-outputting-images/#post-4930354)
 * Storing file. so it is not playing nice with other code. in the same page.
    If
   A precedes B then i get an error, otherwise i get all my URL’s nicey without 
   errors. Code chunk A.
 *     ```
       <div class="recent-posts">
       				<?php $the_query = new WP_Query( 'showposts=3' ); ?>
       				<?php while ($the_query -> have_posts()) : $the_query -> the_post(); ?>
       				<div class="recent-post">
       					<a href="<?php the_permalink() ?>">
       						<?php the_post_thumbnail('frontpage-thumbnail');?>
       						<?php the_title(); ?>
       					</a>
       				</div>
       				<?php endwhile;?>
       			</div>
       ```
   
 * Code chunk B.
 *     ```
       <div class="badges">
       <?php
   
       $badges = $cfs->get('badges');
       foreach ($badges as $badge) {
       	echo $badge['image']; // a sub-field named "image"
       	echo 'test';
       }
       			?>
       			</div>
       ```
   
 * Export just in case
    `{"775":{"post_title":"Home","post_name":"home","cfs_fields":[{"
   id":"2","name":"mission_text","label":"Mission ","type":"textarea","notes":"Your
   mission statement.","parent_id":0,"weight":0,"options":{"default_value":"Pollination
   Event Company\u2019s mission is to design and execute smooth running, distinctive
   events that leave an abiding impression on guests while cross pollinating the
   public with the agricultural community. We produce events that stand out for 
   their flavor, elegance, and mission-driven character.","formatting":"none","required":"
   0"}},{"id":"9","name":"media_chooser","label":"Media chooser","type":"select","
   notes":"Use this to choose whether the Mission Media is a video or image.","parent_id":
   0,"weight":1,"options":{"choices":{"Image":"Image","YouTube Video":"YouTube Video"},"
   multiple":"0","required":"1"}},{"id":"3","name":"mission_media","label":"Mission
   Media","type":"text","notes":"Link to the image or video to be used.","parent_id":
   0,"weight":2,"options":{"default_value":"","required":"0"}},{"id":"14","name":"
   badges","label":"Badges","type":"loop","notes":"","parent_id":0,"weight":3,"options":{"
   row_display":"0","row_label":"Badge","button_label":"Add Image"}},{"id":"15","
   name":"image","label":"Image","type":"file","notes":"","parent_id":14,"weight":
   4,"options":{"return_value":"url","required":"0"}}],"cfs_rules":{"post_types":{"
   operator":"==","values":["page"]},"post_ids":{"operator":"==","values":["760"]},"
   page_templates":{"operator":"==","values":["homepage-template.php"]}},"cfs_extras":{"
   order":"0","context":"normal","hide_editor":"1"}}}`
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Custom Field Suite] Loop field not outputting images](https://wordpress.org/support/topic/loop-field-not-outputting-images/)
 *  Thread Starter [leoland](https://wordpress.org/support/users/leoland/)
 * (@leoland)
 * [11 years, 12 months ago](https://wordpress.org/support/topic/loop-field-not-outputting-images/#post-4930340)
 * debug info
 * WordPress 3.9.1
    PHP 5.3.27 Apache/2.2.22 Mozilla/5.0 (Macintosh; Intel Mac OS
   X 10_9_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1847.116 Safari/
   537.36
 * — Active Plugins —
    Custom Field Suite 2.2.2 Disable Comments 1.1 Easy Add Thumbnail
   1.1 WordPress Importer 0.6.1
 * This code:
 *     ```
       <?php
   
       $badges = $cfs->get('badges');
       foreach ($badges as $badge) {
       	echo $badge['image']; // a sub-field named "image"
       	echo 'test';
       }
       ?>
       ```
   
 * is giving me this output :
    Warning: Invalid argument supplied for foreach() 
   in……line 100 (line in which the foreach statement is declared)
 * the same code pretty much, works fine on a different page.

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