• Resolved Niwa

    (@laniwa)


    Per the documentation:

    toolbelt_related_posts
    Use this to stop related posts from being added to the end of the_content. You can then echo the toolbelt_related_posts_get function to output related posts wherever you like.

    add_filter( 'toolbelt_related_posts', '__return_false' );
    // Add this to your theme files and then call my_related_posts() in your theme.
    function my_related_posts() {
        if (function_exists( 'toolbelt_related_posts_get'){
            echo toolbelt_related_posts_get();
        }
    }

    Can you expand more on how to use this? I have put
    add_filter( 'toolbelt_related_posts', '__return_false' );
    in my functions.php file, but the rest of your code breaks the site:

    Parse error: syntax error, unexpected ‘echo’ (T_ECHO)

    Not sure what I am doing wrong here.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author binarymoon

    (@binarymoon)

    It looks like my example code was wrong. The function is missing a bracket. Try this

    
    add_filter( 'toolbelt_related_posts', '__return_false' );
    // Add this to your theme files and then call my_related_posts() in your theme.
    function my_related_posts() {
        if (function_exists( 'toolbelt_related_posts_get')){
            echo toolbelt_related_posts_get();
        }
    }
    
    Thread Starter Niwa

    (@laniwa)

    Awesome!!! Thank you so much ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Move Related Posts Block’ is closed to new replies.