• I want to add a image banner at the home page, which they will appear under the 5th, 10th, 15th….. post.

    May I know how can I achieve this? Is that I have to doing some php looping functions?

    Any sample codes are greatly appreciated~ thanks 🙂

Viewing 1 replies (of 1 total)
  • what theme are you using?

    generally, you could try to add an action to the 'the_post' hook;

    concept (untested; code to be added to functions.php of your theme):

    add_action( 'the_post', 'custom_banner_function' );
    function custom_banner_function() {
      global $wp_query;
      if( $wp_query->current_post && $wp_query->current_post%5 == 0 ) {
         //whatever code is needed to output the banner(s)//
      }
    }

    http://codex.wordpress.org/Function_Reference/add_action

Viewing 1 replies (of 1 total)

The topic ‘Adding image banner at specific position’ is closed to new replies.