• I have made this shortcode function using the List Category Post plugin in the function.

    I have however a problem, the function works, but the result is displayed in the top of the post, and not where the shortcode is inserted (in the bottom).

    The function looks like this:

    function btext_func( $atts ) {
         extract( shortcode_atts( array(
                   'category' => 'all',
    ), $atts ) );
    echo '<h3>Tasting Notes for this producer</h3>';
    echo (do_shortcode('[catlist name="'.$category.'" tags=taste numberposts=30 excerpt=no date=yes]'));
    echo '<h3>Related articles</h3>';
    echo (do_shortcode('[catlist name="'.$category.'" tags=article excerpt=yes]'));
    }
    add_shortcode( 'btext', 'btext_func');

    How can I move the output to the bottom where the shortcode is inserted in the post.

    /winenerd

    [Moderator Note: Please post code or markup snippets between backticks or use the code button.]

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

The topic ‘Function’ is closed to new replies.