• Here’s what I have in one of my single-custom_post_type.php files – it appears to be ajax related as when its disabled the content will show. However, with Ajax enabled, it appears to be trying to load the content, then spits out “Something has gone horribly wrong”.

    Unfortunately I require the use of Ajax on this piece of hidden content. Any ideas?

    <?php
    $passwordcontent = "<h2>Testing the hidden content</h2>";
    
    echo do_shortcode('[content_protector password="test4" identifier="1234" cookie_expires="1 hour" ajax="true"]' . $passwordcontent . '[/content_protector]');?>

    https://wordpress.org/plugins/content-protector/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi,

    Is there a link I can look at to see it in action?

    Thread Starter corbinfraser

    (@corbinfraser)

    Sorry! It was just on a local server. I ended up just going with the default wordpress password protect feature as I was under the gun for time. If I have a chance to replicate it again on my current project I’ll send you a link to show you. The ajax method would be terrific to use in some of my client projects.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Error: Something has gone horribly wrong’ is closed to new replies.