Hi there!
To customize the post content on single/archive pages, you’ll need to hook into wpfc_sermon_single_v2 and wpfc_sermon_excerpt_v2 filters, respectively.
The functions which have the filters are here. 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 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. Reason: wording
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?
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!
Hey @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
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…
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.
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.
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.