Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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

share|improve this question
    
By opening and closing shortcodes, do you mean [shortcode]something[/shortcode] ? –  Eric Holmes Mar 6 '13 at 18:02
    
Can you point us to an example post that you are trying to put it in? –  Eric Holmes Mar 6 '13 at 18:04
    
any post in blog is same since I added code in theme –  Vijay kudal Mar 7 '13 at 19:35
add comment

2 Answers

up vote 1 down vote accepted

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]' );
    ?>
share|improve this answer
    
thats also not worked –  Vijay kudal Mar 7 '13 at 19:35
    
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? –  Eric Holmes Mar 8 '13 at 15:27
    
in theme,mainly single.php –  Vijay kudal Mar 8 '13 at 18:43
    
one more thing,I want to hind whole content block –  Vijay kudal Mar 8 '13 at 18:44
    
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? –  Eric Holmes Mar 8 '13 at 21:00
show 4 more comments

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

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.