Title: Customizing Loop
Last modified: March 8, 2018

---

# Customizing Loop

 *  Resolved [RevelationTravis](https://wordpress.org/support/users/revelationtravis/)
 * (@revelationtravis)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/customizing-loop/)
 * Do you have any documentation or other instructions on how to customize the loop?
 * I copied archive-wpfc_sermon.php (and single-) into my theme’s root for some 
   minor adjustments to make it fit the general look of my theme, and that works
   fine, but I really wanted to customize the layout of the posts. Specifically,
   I want to utilize Bootstrap 4 card groups, which I have successfully done using
   a custom WordPress loop elsewhere.
 * The loop appears to be the called using a custom function “wpfc_sermon_excerpt_v2”,
   but I’m not sure where I can find that to make adjustments to it. Or is that 
   even possible to do without breaking it?
 * My thought is, and perhaps this is a suggestion for future releases, that I could
   just copy and paste sections of the layout into my custom loop. For example, 
   the picture – copy and paste that to replace “the_post_thumbnail” in the standard
   WordPress loop. And then similar “snippets” for the other various components.
   If such snippets exist, then I would think it would be rather easy for me to 
   copy and paste them wherever and output the expected content? Any help you could
   provide would be appreciated!
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fcustomizing-loop%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  [Nikola](https://wordpress.org/support/users/nikolam/)
 * (@nikolam)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/customizing-loop/#post-10051809)
 * Hi there!
 * To customize the post content on single/archive pages, you’ll need to hook into
   [`wpfc_sermon_single_v2`](https://github.com/WP-for-Church/Sermon-Manager/blob/7236cbeaa8f1797274ebc830647baac6de970d2c/includes/sm-template-functions.php#L480)
   and [`wpfc_sermon_excerpt_v2`](https://github.com/WP-for-Church/Sermon-Manager/blob/7236cbeaa8f1797274ebc830647baac6de970d2c/includes/sm-template-functions.php#L591)
   filters, respectively.
 * The functions which have the filters are [here](https://github.com/WP-for-Church/Sermon-Manager/blob/7236cbeaa8f1797274ebc830647baac6de970d2c/includes/sm-template-functions.php#L386).
   You can see how the data is retrieved, etc.
 * Regarding your thought/suggestion, it’s not yet possible to do that in Sermon
   Manager, and we don’t have it on our [roadmap](http://trello.com/b/xGz75VJD/sermon-manager-roadmap)
   to add that capability simply because majority of our users aren’t asking for
   it, although we understand how, for certain users, this would be beneficial. 
   In our opinion, these filters are just enough for someone who would like to do
   a bit of layout modifications.
 * But, we are working on a similar feature for Sermon Manager Pro. There will also
   be an UI for easy editing of every aspect of the layout. And, we will add an 
   official code for compatibility with Visual Composer, Elementor, Beaver Builder,
   Divi, so users will have even more freedom to create a layout they want.
 * I hope this answers your questions, and if you have more questions or suggestions–
   do not hesitate to reply. 🙂
    -  This reply was modified 8 years, 1 month ago by [Nikola](https://wordpress.org/support/users/nikolam/).
      Reason: wording
 *  Thread Starter [RevelationTravis](https://wordpress.org/support/users/revelationtravis/)
 * (@revelationtravis)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/customizing-loop/#post-10052958)
 * Thank you for your reply! I do appreciate the work that you guys are doing with
   this plugin. I would be interested in learning more about Sermon Manager Pro.
   Is there a way to get in on the beta version?
 *  Thread Starter [RevelationTravis](https://wordpress.org/support/users/revelationtravis/)
 * (@revelationtravis)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/customizing-loop/#post-10052980)
 * Also, looking at the link you provided, I see why my search for wpfc_sermon_excerpt_v2
   failed. It’s because the code says “wpfc_sermon_excerpt_v2(” (note the opening
   parenthesis). If I had run a search through the code using the opening parenthesis,
   I would have found the function and probably my answer. So I have another suggestion–
   add a space in there in case other people are doing control+F like I was. I don’t
   know how many people are doing that, but it seems like it would be an easy change.
 * And thank you for listening to our feedback!
 *  Plugin Author [wpforchurch](https://wordpress.org/support/users/wpforchurch/)
 * (@wpforchurch)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/customizing-loop/#post-10053040)
 * Hey [@revelationtravis](https://wordpress.org/support/users/revelationtravis/),
 * I thought i would chime in about the question regarding the beta for Sermon Manager
   Pro. Yeah absolutely, we’ll be opening up beta sign ups in the next couple of
   weeks and we’ll definitely communicate that out via all channels, so keep an 
   eye out for that.
 * Thanks,
    Igor
 *  Thread Starter [RevelationTravis](https://wordpress.org/support/users/revelationtravis/)
 * (@revelationtravis)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/customizing-loop/#post-10053394)
 * I’m sorry for the third reply, but I just found another suggestion for you guys.
 * I copied and pasted the entire “wpfc_sermon_excerpt_v2 ” function into my own
   functions.php file for modification and ran into a “Cannot redeclare wpfc_sermon_single_v2()”
   error.
 * This should be able to be resolved by wrapping the function in an if statement,
   like this:
 * if ( ! function_exists( ‘wpfc_sermon_single_v2’ ) ) {
    function wpfc_sermon_single_v2(
   $return = false, $post = null ) {
 * Just an idea…
 *  [Nikola](https://wordpress.org/support/users/nikolam/)
 * (@nikolam)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/customizing-loop/#post-10053486)
 * That’s the reason why those filters are there. 🙂
 *     ```
       add_filter( 'wpfc_sermon_single_v2', function(){
         $html = '...' // custom layout
   
         return $html;
       } );
       ```
   
 * Same applies for `wpfc_sermon_excerpt_v2`, just replace the filter name.
 * Edit: Just add this code to your functions.php file, no need to re-declare functions.
    -  This reply was modified 8 years, 1 month ago by [Nikola](https://wordpress.org/support/users/nikolam/).
 *  Thread Starter [RevelationTravis](https://wordpress.org/support/users/revelationtravis/)
 * (@revelationtravis)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/customizing-loop/#post-10053900)
 * Oh okay, I didn’t quite notice those filters! I tried using the example code 
   there and I must be missing something. I can’t get it to work.
 * Redeclaring the functions does seem to work, but I’m guessing that’s not the 
   best way to do it?
 * Can you give a basic example using the start of some basic HTML? I’m sure it’s
   something simple that I’m missing.
 *  [Nikola](https://wordpress.org/support/users/nikolam/)
 * (@nikolam)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/customizing-loop/#post-10054103)
 * Hey,
 * I did miss a semicolon on the second line, but it should work otherwise:
 *     ```
       add_filter( 'wpfc_sermon_single_v2', function () {
       	$html = '...'; // custom layout
   
       	return 'hehehe';
       } );
       ```
   
 * Note: This will only change the output of the single sermon. You’ll need to replace`
   wpfc_sermon_single_v2` with `wpfc_sermon_excerpt_v2` for it to work on archive
   pages and/or shortcode (if you are using development version, otherwise it won’t
   affect shortcode output at all).
 * Now you just need to replace `...` with the HTML you want.

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

The topic ‘Customizing Loop’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/sermon-manager-for-wordpress_688896.
   svg)
 * [Sermon Manager](https://wordpress.org/plugins/sermon-manager-for-wordpress/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/sermon-manager-for-wordpress/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/sermon-manager-for-wordpress/)
 * [Active Topics](https://wordpress.org/support/plugin/sermon-manager-for-wordpress/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/sermon-manager-for-wordpress/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/sermon-manager-for-wordpress/reviews/)

## Tags

 * [customization](https://wordpress.org/support/topic-tag/customization/)
 * [loop](https://wordpress.org/support/topic-tag/loop/)
 * [modular](https://wordpress.org/support/topic-tag/modular/)
 * [single](https://wordpress.org/support/topic-tag/single/)

 * 8 replies
 * 3 participants
 * Last reply from: [Nikola](https://wordpress.org/support/users/nikolam/)
 * Last activity: [8 years, 1 month ago](https://wordpress.org/support/topic/customizing-loop/#post-10054103)
 * Status: resolved