andrew15 Posted November 15, 2018 Report Share Posted November 15, 2018 Hi, Can I use content locker directly in template files to lock content? Rather than using shortcode via CMS. Thanks Link to comment Share on other sites More sharing options...
Support Jitendraa Posted November 15, 2018 Support Report Share Posted November 15, 2018 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 comment Share on other sites More sharing options...
andrew15 Posted November 15, 2018 Author Report Share Posted November 15, 2018 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 comment Share on other sites More sharing options...
Support truongwp Posted November 17, 2018 Support Report Share Posted November 17, 2018 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 comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now