Title: PHP within repeater template
Last modified: September 1, 2016

---

# PHP within repeater template

 *  [AlanPratt](https://wordpress.org/support/users/alanpratt/)
 * (@alanpratt)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/php-within-repeater-template/)
 * Hi
 * I’m trying to crop the content within the repeater template, like so:
 * `<?php substr(strip_tags(the_content()), 0, 93) . '...'; ?>`
 * However it isn’t working as expected, instead is loading the full content. Is
   there a reason the plugin isn’t processing php functions or is there something
   I’m missing?
 * Thanks
 * Alan
 * [https://wordpress.org/plugins/ajax-load-more/](https://wordpress.org/plugins/ajax-load-more/)

Viewing 1 replies (of 1 total)

 *  Plugin Author [Darren Cooney](https://wordpress.org/support/users/dcooney/)
 * (@dcooney)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/php-within-repeater-template/#post-7722156)
 * Solved offline with the following code.
 *     ```
       <?php
         global $post;
         echo substr(strip_tags(get_post_field('post_content', $post->ID)), 0, 93) . '...'); 
       ?>
       ```
   

Viewing 1 replies (of 1 total)

The topic ‘PHP within repeater template’ 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/)

## Tags

 * [function](https://wordpress.org/support/topic-tag/function/)
 * [php](https://wordpress.org/support/topic-tag/php/)
 * [repeater](https://wordpress.org/support/topic-tag/repeater/)
 * [template](https://wordpress.org/support/topic-tag/template/)

 * 1 reply
 * 2 participants
 * Last reply from: [Darren Cooney](https://wordpress.org/support/users/dcooney/)
 * Last activity: [9 years, 9 months ago](https://wordpress.org/support/topic/php-within-repeater-template/#post-7722156)
 * Status: not resolved