• Hello,

    I am using the following example you had listed in another post which works great.

    <?php
    echo do_shortcode('[content_protector password="password"]'
    		. get_the_content()
    		. '[/content_protector]');
    ?>

    The only problem is when I attempt to use it with Ajax I get the following error “Something unusual has happened. Content Protector cannot find your shortcode in this Post.”

    <?php
    echo do_shortcode('[content_protector password="password" identifier="ajax" ajax="true"]'
    		. get_the_content()
    		. '[/content_protector]');
    ?>

    https://www.ads-software.com/plugins/content-protector/

Viewing 2 replies - 1 through 2 (of 2 total)
  • K. Tough

    (@kjvtough)

    Hi, PthPndr.

    You’re likely trying to do this in a template file, I’m guessing. When the plugin processes the form, if there’s an AJAX request, it tries looking in the current page/post for the shortcode (i.e., any content that would be in the wp_posts table). Since your shortcode isn’t there (because it’s in a template), it fails. For now, you’ll have to forgo using AJAX in this particular situation, but I’ll see if it can be fixed in a future release.

    Hi K. Tough.

    It would be grad if you could make it work with an template or theme.
    Because I like your plugin but it isn’t working for me like this. :/

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Something unusual has happened. Content Protector cannot find your shortcode’ is closed to new replies.