Help in Adding Custom "After Feed" Placement

5 months ago | lucianop (Member) | |

Hi John,

I'm trying to add a custom placement that appears after the post content, only when I'm looking at the item's feed. I am trying not to edit the default feed templates. My best try so far is: In my functions.php I added the following:


add_filter('the_content', 'add_after_feed_placement');

function add_after_feed_placement($content)
{
if (!is_feed()) return $content;
$content = $content . the_sniplet_place('afterfeed');
// $content .= '[sniplet afterfeed]';

return $content;
}


The sniplets for that place get inserted BEFORE the content (it seems that it is inserted exactly when the 'the_sniplet_place' is called, being that BEFORE returning the $content). If I try to add the sniplet tag instead (see commented line), it goes as is and is not processed by the plug-in.
Maybe I could do this with stuff like do_action, add_action but I am not well-versed in it and all my attempts have failed.

Any advice to help me fix this is welcome!
Thanks!

Read responses...

Responses

  1. John:

    Posted 4 months ago by Key Master

    This feature is going into the next version of Sniplets, as well as placing sniplets on archives and the home page.

Reply

You must log in to post.

Home | Software | Terms & Conditions | Sitemap | John Godley © 2008