Target specific post on home page


/ Published in: PHP
Save to your folder(s)

This example is adding a feature box after the first post. You can apply it to any of the hooks inside the loop.


Copy this code and paste it in your HTML
  1. function custom_feature_box($post_count = true) {
  2. if (($post_count == 1) && is_home())
  3. thesis_feature_box_content();
  4. }
  5. add_action('thesis_hook_after_post','custom_feature_box');

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.