I am using plugin like to read http://wordpress.org/extend/plugins/like-to-keep-reading/ problem is its using opening and closing shortcodes,when I embed them to my site http://vijaykudal.info only opening short codes displayed,can you please help me? PS:-tried with different themes as well
-
By opening and closing shortcodes, do you mean [shortcode]something[/shortcode] ?– Eric HolmesMar 6, 2013 at 18:02
-
Can you point us to an example post that you are trying to put it in?– Eric HolmesMar 6, 2013 at 18:04
-
any post in blog is same since I added code in theme– Vijay kudalMar 7, 2013 at 19:35
2 Answers
To put shortcode within a PHP template, use do_shortcode();
<?php
echo do_shortcode( '[like_to_read]The text that is hidden from the user.[/like_to_read]' );
?>
Edit:
<?php
echo do_shortcode( '[like_to_read]' . get_the_content() . '[/like_to_read]' );
?>
-
-
Are you using the shortcode within page.php? You need to give some more information here. Is it within the page content in TinyMCE Editor? Mar 8, 2013 at 15:27
-
-
-
Added what the shortcode would look like. Please ensure that you do have the plugin set up properly, and that you can get the shortcode to work within TinyMCE before you try within the template .php files. Does it work when in TinyMCE? Mar 8, 2013 at 21:00
my your theme deactived shortcodes , so this tools save time to search about shortcode remove word in folders so when tool got installed, click on theme file and click on grepwin then write remove_shortcode then wait to see the resluts , and after if there's any pages contains remove_shortcode will appear in box bellow, all u had to do is playing with codes may it works ! or simply you can user this shortcode
for example
function shortcode_content_post_url() {
echo 'short codes is cool';
}
add_shortcode('cool', 'shortcode_content_post_url');
and in url post type [cool]
then it will appear short codes is cool