[OFFER ALERT!] This Halloween, Get Any Premium Theme for Just $19 [GET IT NOW]
Jump to content

[Content Locker] Use within template file


Recommended Posts

  • Support

Hello,

Thank you for contacting MyThemeShop.

There is no way to add the content locker directly inside the post/page.

You need to add shortcode there to cover your requirement.

Let us know if you need anything else.

Thank you.


🏁Rank #1 on Google With our WordPress SEO Plugin.

Score a 💯on PageSpeed and Dominate Search Rankings.

✏ Editing theme files? Please create a child theme to make your changes update-proof.

Link to post
Share on other sites

Thanks for your reply Jitendraa.

We are using a custom post type and it's not feasible to block content for every post using the shortcode within the CMS. So we are looking for a way to be able to add the content blocker around a section directly within the template files.

Thank you though.

Link to post
Share on other sites
  • Support

Hello,

I'm not sure this is what you need but you can use do_shortcode() function to display the shortcode in your template.

https://developer.wordpress.org/reference/functions/do_shortcode/

Thank you.


🏁Rank #1 on Google With our WordPress SEO Plugin.

Score a 💯on PageSpeed and Dominate Search Rankings.

✏ Editing theme files? Please create a child theme to make your changes update-proof.

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...