get_posts array parameters not changing
-
Hello everyone
I have looked around for problems similar to mine but I can’t seem to find any solutions. I am using the get_posts function with the parameter array found at https://codex.www.ads-software.com/Template_Tags/get_posts
The way I am using the array is like this:
$args = array( 'posts_per_page' => -1, 'offset' => 0, 'category' => 9, 'orderby' => 'ID', 'order' => 'ASC' ); $myposts = get_posts( $args );
It returns the category I select but I can change the other parameters such as “orderby” and “order” and it makes no difference on the order of the posts. “posts-per_page” and “offset” do change what is returned.
Any help on this topic will be greatly appreciated!
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘get_posts array parameters not changing’ is closed to new replies.