If you’ve created a custom layout, where did you put it? I use custom archive and taxonomy page(s). I created a child theme and save them in the theme’s folder.
I finally got the pages to look right, but the compromise is that the slug has to stay as “sermons”. I have a page named “messages” that uses shortcodes to produce the desired layout for the archive listing. The individual sermon pages come under the slug “sermons”. If I change the Archive Page Slug setting to anything other than sermons, the individual pages appear to no longer be governed by the Sermon Manager plugin, other than to be published.
Can you explain more about how you made this work for you?
Can you explain more about how you made this work for you?
Like I mentioned earlier, I created a child theme. If your not familiar with creating child themes, Google ‘create child theme wordpress’. The reason you want to do that is if the theme developer makes a change, you changes are not lost if you use a child theme.
I copied the index.php to my child theme root and renamed it archive-wpfc_sermon.php. Then by removing parts you don’t need on the index.php page and copying parts from the plugin’s views/partials/content-sermon-archive.php to the newly created archive-wpfc_sermon.php.
Here is our site’s sermon page: https://faithcommunitybible.org/sermons/
Hope this helps.
Thanks! I’ll give that a try.
Hi @rfryenmc,
This sounds like an issue with permalinks cache not being flushed. Let’s try something:
- Open Sermon Manager Settings, and change the archive slug to
messages
- Go to WordPress Settings -> Permalinks
- Click on “Save Changes”
- Try loading sermons at the new slug
The permalinks should be flushed as soon as the slug has been changed, but something is maybe preventing it from happening.
@hikinmike, thank you for the suggestions, but I think that the issue is occurring above page-loading level. But we’ll see after debugging. π
Yes, that solved the slug problem! Now my only question is how to use my “Messages” page that loads the list using shortcodes, instead of the default listing provided by the plugin. Is that possible?
Hi, unfortunately, that is not yet possible, but as a workaround, you could set the slug to “message”, so individual sermons will load at “/message/the-sermon-slug”, and all sermons will load your page at “/messages”.
However, “/message” will also load all messages, but you could create a file override in your theme, named “archive-wpfc_sermon.php”, with the following code:
<?php
/**
* Redirects Sermon Manager archive page to the WordPress page.
*/
wp_redirect( get_page_link( 0 ) );
exit;
Note: Don’t forget to replace the zero with the page ID where shortcode is located. Also, this may or may not work, we have not tested it. There might be some unexpected behavior.
Thanks for the help, @nikolam. That code doesn’t work because it creates too many redirects (according to Chrome). I’ll just have to decide which is the preferred compromise: having the individual sermons under the /sermons URL, or having the archive listing show in its default format. I know I can tweak it visually with CSS, but that’s not what I’m after. Maybe a future update can add a “featured sermon” option. π
Actually it IS possible… I just figured out a way and can share code later. You use the /partials/ feature in your child theme. On the archive page you’ll query the current url so you know if you’re on the general archive list or the page is being used for searches. You can’t kill the archive query loop (as far as I can figure out) but you can see what the post count is and then code how to handle it. It’s not pretty but it works.