How to call shortcode function directly and pass $atts

do_shortcode() just parses the string. You have to use echo or print to print it out.

function_exists() expects a string that matches a function name. After looking at the plugin, I would try this code:

<?php
if ( function_exists( 'mediacategories_func' ) )
{
?>
<h1>Inspiration</h1>
<?php
    print mediacategories_func( array( 'categories' => 6 ) );
}

Leave a Comment