• Resolved lauratraveler

    (@lauratraveler)


    Hi, is it possible to load this plugin only on pages that actually have a recipe? I see a lot of .wprm-recipe- CSS and <polygon class=”wprm-star-empty” id=”wprm-star-empty-4″ type of code on all the other pages as well and it serves no purpose there. Thank you!

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Brecht

    (@brechtvds)

    Hi there,

    What are your settings on the WP Recipe Maker > Settings > Performance page set to?

    Is “Only load Assets when needed” enabled there?

    Thread Starter lauratraveler

    (@lauratraveler)

    @brechtvds Yes, “Only load Assets when needed” was enabled. I also enabled “Default Snippet Templates in Footer” and “Default Recipe Templates in Footer”. As a consequence, I can’t see the CSS anymore, but I can still see a lot of <use xlink:href=”#wprm-star-empty-0 code in the comments section. Obviously, there’s nothing to rate on posts without recipes so no stars show on the front end. But it seems like the code for the star ratings still loads in code.

    Plugin Author Brecht

    (@brechtvds)

    That’s normal. The comment ratings feature does load in the comment by default and then stays hidden if there’s no recipe on the page. It’s not that much code, so the impact should be minimal. The alternative is to check the entire post content for a recipe first, which also has implications.

    And in some cases the recipe isn’t actually part of the post content, but rather some custom field, and the comment stars still need to be there.

    Thread Starter lauratraveler

    (@lauratraveler)

    @brechtvds Okay, cool! ??

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Load only on recipe pages’ is closed to new replies.