Home › Forums › Support › Add content after the first post's title in categories This topic has 3 replies, 2 voices, and was last updated 7 years ago by Tom. Viewing 4 posts - 1 through 4 (of 4 total) Author Posts March 21, 2017 at 4:40 am #295156 Inverweb Spain, S.L. Hello, I would like to add content only after the first post’s title in categories, so I have the following code: GP Hook: After Entry Title <?php if(is_category() /*&& post_index_within_loop == 0 */) { echo "my content"; } ?> But I need some function to get the post index withing the loop, is there any hook to achieve it? Regards March 21, 2017 at 9:36 am #295301 TomLead Developer Lead Developer Hi there, Not 100% sure it’s possible, but if it is, this will be how to do it: <?php global $wp_query; if ( 0 === $wp_query->current_post && is_category() ) { echo 'My content'; } ?> March 22, 2017 at 1:16 am #295569 Inverweb Spain, S.L. Yes, it worked! Thanks March 22, 2017 at 10:13 am #295825 TomLead Developer Lead Developer You’re welcome 🙂 Author Posts Viewing 4 posts - 1 through 4 (of 4 total) You must be logged in to reply to this topic. Log In Username: Password: Keep me signed in Log In