Adding a post shortcode to a page template?

hey guys,
The “mingle forum plugin” provides the following shortcode [mingleforum].
When I paste this into a page the forum is shown.

My forum is using a specific page-template called forum.php. Is it possible to already include this shortcode in the page-template itself, so I don’t have to paste it in the wordpress backend anymore. So that when I use the forum.php page template the forum is always automatically embedded?

Read More

Thank you for your tipps and info.

Related posts

Leave a Reply

1 comment

  1. To use shortcode in a PHP file (outside the post editor) you have the handy little function
    do_shortcode();

    so in your case you use:

    <?php
    do_shortcode('[mingleforum]');
    ?>
    

    Update:

    following the first comment,
    I figured its publicly known for some reason,

    if you are expecting output from the shortcode then echo it out.

    <?php
    echo do_shortcode('[mingleforum]');
    ?>