I have content locker plugin.
For locking contents, im using this shortcode:
[wp-like-locker]
Your locked content here…
[/wp-like-locker]
and I need lock every post on my blog. How could I instert this shortcodes into theme and lock:
Thank you very very very much for your answer and time!
You can hardcode shortcodes into a theme using
do_shortcode
.http://codex.wordpress.org/Function_Reference/do_shortcode
You will most likely want to replace the hard-coded “Your locked content here…” with the function that pulls the content from the editor, like
the_content
http://codex.wordpress.org/Function_Reference/the_content
It might look like
It would be both faster and cleaner to write a function to do this and put it in functions.php. It’d look like this (untested):
you can use do_shortcode() evaluate your short code.
you can place below code into sigle.php in your wordpress theme. And this will apply all of your posts those are using default template.