same get_posts function works diffrently in tag.php and functions.php
-
Hi,
I have a strange issue that i don’t really understand, I explain : In my tag.php, i have an infinite scroll with custom post types thanks to the active tag and ajax.I do the same get_posts in functions.php in my ajax function :
$posts = get_posts( array( 'post_type' => 'video', 'posts_per_page' => 6, 'paged' => 1, 'post_status' => 'publish' )) ;
This simple get_posts not returning same values !
I replaced ‘paged’ with ‘offset’ and nothing changed !
How it’s possible ? What i forgot ?
If i add ‘order’ => ‘ASC’ and ‘orderby’ => ‘ID’ for example, it’s the worst !
Any ideas ? Thanks for help me.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘same get_posts function works diffrently in tag.php and functions.php’ is closed to new replies.