Support » Plugins and Hacks » Execute brackets [] tags in theme files?

  • I try to use the plug-in multifeedsnap to leech content via RSS to my blog. But I have trouble getting this plug-in to work outside of a post or a page, since I only know the code with brackets. My header.php doesn’t know what to do with this brackets so it’s just displayed as text.

    According to the documentation I should use:

    [feedsnap, 8]feedurl[/feedsnap]

    Then I thought it would be possible to use

    <?php
    if (function_exists('multifeedsnap_function'))
    { multifeedsnap_function("[feedsnap, 4]http://wordpress.com/tag/hot-blogger-bracket/feed/[/feedsnap]"); }
    ?>

    to activate the plug-in in my header. But it doesn’t work. Any thoughts?

Viewing 1 replies (of 1 total)
  • Hey object81,
    Just saw this now. MFS uses the WP hook as follows (line 154 of MFS code):

    add_filter(‘the_content’,’multifeedsnap_function’);

    This means that the MFS brackets are only processed when WP is about to display ‘the_content’. If yoiu check out the filter/hooks references you might find one that suits your needs. I had a quick look but couldn’t find one that was obvious.

    When you find one that suits you, replace the ‘the_content’ part of line 154 above with your preferred hook, and it *should* work like a dream 🙂

Viewing 1 replies (of 1 total)
  • The topic ‘Execute brackets [] tags in theme files?’ is closed to new replies.