• how to get a current post index number for “offset” function in single.php?

    I would like to loop the previous post (starting from current post) and using “offset” function, I try to (while & count++) to find out the index number of current post.
    (offset='”.$current_post_index_number.”‘) in single post.

    But my website have over 10000+ posts.(while & count++) to find out the index number of current post will hangup the server.

    is it possible having other method or function to do it ?

    https://wordpress.org/plugins/ajax-load-more/

Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘offset in single.php’ is closed to new replies.