Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter curt2008

    (@curt2008)

    Would you mind just providing an example of using the loop_start action please?

    I’ve tried the following to no avail:

    public function __construct() {
        add_shortcode('CONTINUED', array(&$this, 'replaceShortcode'));
        add_action('loop_start', array(&$this, 'replaceShortcode'));
    }
    
    public function replaceShortcode() {
        global $post;
    
        if(is_user_logged_in()) {
            return str_replace('[CONTINUED]', '<div>In page 1</div><!--nextpage--><div>In page 2</div>', $post->post_content);
         }
    }
    Thread Starter curt2008

    (@curt2008)

    Did a DNS Cache clear and restarted Apache to find out that it’s sorted.

    Thanks for your response!

Viewing 2 replies - 1 through 2 (of 2 total)