• Hello everyone,

    I’m trying to add a custom filter with a plugin I’m creating to show a box on the front page, just before the Posts loop, but after the header. Is there a hook for that? I’m searching for 4 hours now and I couldn’t find the hook I’m looking for.
    This is my code:

    function norilsk_filter($content) {
    	if (is_single())
    		return $content.box1().style();
    	elseif (is_home())
    		return $content.box2().style();
    	else
    		return $content;
    }
    add_filter('comments_template','norilsk_filter');
    add_filter('the_header','norilsk_filter');

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘add_filter before homepage loop’ is closed to new replies.