I'd like to insert a banner after the first or second post on a multi post page (archives, for example).
I've seen the same solution over and over, that is to modify template files or index.php.
I'm using a child theme of a premium theme (Headway), so the best way for me is to add some action or filter inside functions.php. However, I wasn't able to find a way to do it.
First of all, I am not able to know the number of the current post on the page from inside a filter or action hook function.
Any suggestion?