Title: Not Working
Last modified: August 22, 2016

---

# Not Working

 *  Resolved [jarth3000](https://wordpress.org/support/users/jarth3000/)
 * (@jarth3000)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/not-working-990/)
 * Hello!
 * I can get the plugin to work with your basic repeater template, but when I make
   changes to the template it no longer works.
 * Here is the shortcode I’m using:
 * `[ajax_load_more post_type="results" posts_per_page="6" scroll="false" pause="
   true"]`
 * And here is the repeater template:
 *     ```
       <div class="results-item">
       	<!-- article -->
       	<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
   
       		<!-- post thumbnail -->
       			<img src="<?php echo get('results_image'); ?>" />
       		<!-- /post thumbnail -->
   
       	</article>
       	<!-- /article -->
       </div>
       ```
   
 * I suspect it has something to do with the custom field that I’m attempting to
   pull, but from reviewing your support page here the plugin should support custom
   fields. So I’m not sure what the issue is.
 * Any guidance would be much appreciated!
 * [https://wordpress.org/plugins/ajax-load-more/](https://wordpress.org/plugins/ajax-load-more/)

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

 *  Plugin Author [Darren Cooney](https://wordpress.org/support/users/dcooney/)
 * (@dcooney)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/not-working-990/#post-5582623)
 * Yea I also suspect it doesn’t know what `get('results_image')` is.
 * Can you confirm there are no errors with that code?
 *  Thread Starter [jarth3000](https://wordpress.org/support/users/jarth3000/)
 * (@jarth3000)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/not-working-990/#post-5582627)
 * No errors.
 * I’m using Magic Fields 2 to create the custom fields, of which that results_image
   is one.
 *  Thread Starter [jarth3000](https://wordpress.org/support/users/jarth3000/)
 * (@jarth3000)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/not-working-990/#post-5582628)
 * But to that end, if the code is correct, should the plugin just be running said
   code? Or is it rendering differently?
 * I haven’t really dug into your code at all to see how it’s doing everything.
 *  Plugin Author [Darren Cooney](https://wordpress.org/support/users/dcooney/)
 * (@dcooney)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/not-working-990/#post-5582644)
 * it should have access to that function. For example, Advanced Custom Fields work
   within the repeater templates.
    The repeaters are just include files.
 * If you remove that line does it render?
 *  Thread Starter [jarth3000](https://wordpress.org/support/users/jarth3000/)
 * (@jarth3000)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/not-working-990/#post-5582651)
 * I can confirm that’s what’s the issue.
 * I just inspected the html that is spit out on the page load and it begins to 
   load, but when it hits where that image would be it stops.
 *  Thread Starter [jarth3000](https://wordpress.org/support/users/jarth3000/)
 * (@jarth3000)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/not-working-990/#post-5582653)
 * It renders fine up until that line of code.
 *  Plugin Author [Darren Cooney](https://wordpress.org/support/users/dcooney/)
 * (@dcooney)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/not-working-990/#post-5582656)
 * Ill install Magic Fields 2 and test this out later today.
 *  Thread Starter [jarth3000](https://wordpress.org/support/users/jarth3000/)
 * (@jarth3000)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/not-working-990/#post-5582666)
 * Thanks.
 *  Plugin Author [Darren Cooney](https://wordpress.org/support/users/dcooney/)
 * (@dcooney)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/not-working-990/#post-5582859)
 * Ok so you need to include a core file (`mf_front_end.php`) from Magic Fields 
   2 to have this work with Ajax calls.
 * Here is my working repeater:
 *     ```
       <li>
       <?php
       $root = $_SERVER['DOCUMENT_ROOT'];
       require_once($root . '/wp-content/plugins/magic-fields-2/mf_front_end.php');
       ?>
       <h2><?php echo get('test_field') ;?></h2>
       <h3><a href="#" title="<?php the_title(); ?>"><?php the_title(); ?></a></h3>
       <p class="entry-meta">
           <?php the_time("F d, Y"); ?> - page(<?php echo $alm_page; ?>) - item(<?php echo $alm_item; ?>)</p>
       </p>
       <?php the_excerpt(); ?>
       </li>
       ```
   
 * This is the thread that helped me out – [https://wordpress.org/support/topic/using-magic-fields-2-template-functions-with-ajax-calls?replies=3](https://wordpress.org/support/topic/using-magic-fields-2-template-functions-with-ajax-calls?replies=3)
 * Reviews are always appreciated if I have helped you solve the issue 🙂
 * Best of luck.
 *  Thread Starter [jarth3000](https://wordpress.org/support/users/jarth3000/)
 * (@jarth3000)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/not-working-990/#post-5582878)
 * You sir, are fantastic.
 * Thank you very much.
 * Review inbound.
 *  Plugin Author [Darren Cooney](https://wordpress.org/support/users/dcooney/)
 * (@dcooney)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/not-working-990/#post-5582916)
 * Excellent 🙂
    Cheers!

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

The topic ‘Not Working’ is closed to new replies.

 * ![](https://ps.w.org/ajax-load-more/assets/icon-256x256.png?rev=2944639)
 * [Ajax Load More – Infinite Scroll, Load More, & Lazy Load](https://wordpress.org/plugins/ajax-load-more/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/ajax-load-more/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/ajax-load-more/)
 * [Active Topics](https://wordpress.org/support/plugin/ajax-load-more/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/ajax-load-more/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/ajax-load-more/reviews/)

 * 11 replies
 * 2 participants
 * Last reply from: [Darren Cooney](https://wordpress.org/support/users/dcooney/)
 * Last activity: [11 years, 5 months ago](https://wordpress.org/support/topic/not-working-990/#post-5582916)
 * Status: resolved