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

    (@patabugen)

    I’ve worked around outputting a links in a sidebar before displaying the page content by starting a new output buffer and rendering the page before outputting the sidebar then echoing the captured output in the correct place.

    @patabugen … I was able to do the same… using a custom function…

    functions.php

    function create_post_links() {
        global $post;
        global $mwm_aal;
        $content= $post->post_content;
        $mwm_aal->find_content_links( $content );
        return $mwm_aal->output_content_links();
    }
    add_action( 'init', 'create_post_links', 1, 0 );

    Call it before your sidebar…

    <?php create_post_links(); ?>
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Cannot call output_content_links before the_content()’ is closed to new replies.