Plugin Author
Brecht
(@brechtvds)
If “Only load Assets when needed” is enabled on the WP Recipe Maker > Settings > Performance page those JS files should only get loaded on pages that include recipes.
Could you check what that setting is set to?
Thread Starter
jer1ko
(@jer1ko)
I have it set to only load assets when needed. I do have post previews that where the post does have a recipe in them but not showing the card. Check it out at https://ketokarma.com
Plugin Author
Brecht
(@brechtvds)
Looks like you’re displaying the recipe rating, times and net carbs on the homepage. It’s probably using the recipe shortcodes for that and once you use one of our shortcodes it indicates the plugin as being “in use” and loads those assets.
Thread Starter
jer1ko
(@jer1ko)
I am calling those directly from the WPRM_Recipe_Manager class WPRM_Recipe_Manager::get_recipe_ids_from_post(); and $recipe = WPRM_Recipe_Manager::get_recipe($recipeId); but I can see how that may insert the tags in the DOM. I’ll disable those assets from running on the main page and test to ensure nothing is broken.
Thread Starter
jer1ko
(@jer1ko)
Also, thanks for the work you guys put in on this plugin and your attention to support!
Plugin Author
Brecht
(@brechtvds)
You could indeed try using wp_deregister_script function to deregister the wprm-public and wprmp-public scripts on the homepage. That should not cause any issues here!
Do let me know if you have any other questions at all.
Thread Starter
jer1ko
(@jer1ko)
Sounds good, that is the route I’m taking for the homepage. Thanks again!