I was wondering if anyone knew how I would go about making code injection only appear for premium members?
I have currently got a system setup that allows people to listen to my articles via BeyondWords, but I would like to make this feature only available to paying subscribers. Currently, everyone can see and use this feature, even non-paying members on private articles. Could anyone give me some advice here?
Ghost is pitching itself as a members-focused platform first and I think features like this are essential for publishers to run a member-focused website.
Hey,
if the html has to be, say, at the top or middle of your article, then put a HTML placeholder where the player has to be. Then, at the very end of your article, place the paywall as Ghost natively offers. After doing so, place your beyondwords integration with a js in order to transfer it into your placeholder. Create a #beyondwords internal tag and custom your content-cta.hbs template file using the tag. If the member isn’t a premium and your page has the #beyondwords tag, then the CTA only masks the content without displaying a message (you can custom a “Beyondwords is for premium” warning in your placeholder div) ; if the page hasn’t the tag, then display the normal CTA
in case someone came looking for answers like me, that i got it working placing the code in the default.hbs of my theme instead of the site wide code injection or even the codejection on the post.