WordPress.org

Ready to get started?Download WordPress

Forums

HungryFEED
HungryFeed plugin: Use in theme templates with do_shortcode? (2 posts)

  1. nwarmenh
    Member
    Posted 3 years ago #

    I believe I have the plugin configured correctly, because I can successfully use a shortcode in a post.

    But if I try to put that shortcode in one of my theme's template files (using do_shortcode()) I get no results. Here's the syntax, in case I've made some stoopid typo:

    <?php do_shortcode('[hungryfeed url="http://www.facebook.com/feeds/page.php?id=152216718144073&format=rss20" max_items="5" template="1"]') ?>

    I've encountered plugins before that don't allow for use with do_shortcode() -- is this one of them?

  2. Jason
    Member
    Plugin Author

    Posted 3 years ago #

    Your code is just missing one thing (notice 'echo' preceding your code)

    <?php echo do_shortcode('[hungryfeed url="http://www.facebook.com/feeds/page.php?id=152216718144073&format=rss20" max_items="5" template="1"]') ?>

    If your template supports widgets, though, you can also try adding the hungryFEED shortcode in a text widget. That way you don't have to alter the template code. (You can enable HungryFEED to work in widgets on the HungryFEED settings page.)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags