Post loop as list item

You can make post loop as list item by using following action hooks

add_action('post_grid_before_loop', 'post_grid_before_loop_ol_start');
function post_grid_before_loop_ol_start(){
    ?>
    <ol>
    <?php
}


add_action('post_grid_loop', 'post_grid_loop_li_start', 5);
function post_grid_loop_li_start($args){
    ?>
    <li>
    <?php
}

add_action('post_grid_loop', 'post_grid_loop_li_end', 90);
function post_grid_loop_li_end($args){
    ?>
    </li>
    <?php
}


add_action('post_grid_after_loop', 'post_grid_after_loop_ol_end');
function post_grid_after_loop_ol_end(){
    ?>
    </ol>
    <?php
}

 

View post on imgur.com