Plugin shortcode won’t work on a custom template file [closed]

I have created a custom template in the Twenty Sixteen theme and I want to add Social stacks plugin shortcode there but the SC never runs. The shortcode runs as expected on posts or in other pages.

What this plugin does is that, it showcases social content into one slider to be embedded on pages/posts.

When removing the shortcode from the template, there are no changes whatsoever.
I have tried:

  • Checking if all scripts and styles are enqueued.
  • Looking for plugin conflicts by disabling and activating plugins one
    by one.
  • Creating a custom header.php and footer.php for my template.

Nothing seems to work 🙁

I’m getting a fatal error “Fatal error: Call to a member function get_blog_prefix() on a non-object in ../public_html/stats/wp-includes/class-wp-user.php on line 455” when I call the wp_head() or wp_footer() in my template.

This is just a simple template without no loop, just a few database calls to supply a statistics table with data.

Here’s my shortcode:

<div class="portlet-body">
     <?php echo do_shortcode('[wss id="1"]'); ?>
                      </div>

Any help will be greatly appreciated, thanks.

0

Leave a Comment