How can I avoid code repetition between shortcodes and partials?

I have the very same working code in both directories. Obviously, this isn’t ideal …
Is there a way to come round this?

Stupid me, just include the partial in the shortcode!

1 Like

That’s how I do it :wink:

If I remember well, just pay attention about indentation in your partial.
Flatten the code helps avoiding rendering issues.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.