FluentCart in Fluent Community - Product Page Template
I have purchased FluentCart and I have it connected with FluentCommunity. I am able to use the FluentCommunity Frame page template (for page builders) for the Shop, Account, Cart, Receipt, and Checkout pages.
But how do I get the individual product pages to use the FluentCommunity Frame page template? It defaults to a regular WordPress page template.
Sent this just now as a support ticket because I think there is something missing here.
I'm struggling with this as well.
Lisa RichardsonΒ I have a snippet they just sent me.
"Single product pages are generated from theΒ customΒ post type, so the template isnβt selectable directly from the editor. If you want your individual product pages to load inside the FluentCommunity Frame, you can enable it with a small snippet. FluentCommunity provides a filter that lets you force any post type to use the Frame template."
[I removed the old snippet because it doesn't work. New snippet posted below]
Although I still can't get it to work. Let me know if you did.
Kevin WatsonΒ I'll give it a try - I've tried creating a page template in the editor and that didn't work. I get the original content either before or after what I set up, but if I remove the first content area, nothing renders at all, even if I have a content area on the page.
Lisa RichardsonΒ Hey Lisa. They updated the snippet to use and it works. I use the Fluent Snippets plugin and used the condition to apply only to products. Here is the updated snippet:
add_filter('fluent_community/template_slug', function ($templateSlug) {
if (is_singular(['fluent-products'])) {
return 'fluent-community-frame.php';
}else return $templateSlug;
});
Kevin WatsonΒ Thanks, I was also looking for the solution for a few hours already.
You are a lifesaver! β€οΈπ