Add both orderby
and order
query parameters.
Here is an excerpt of the PHP code you need:
$query_args = array(
"category_name" => "elektrotechniek",
"orderby" => "post_title",
"order" => "ASC"
);
Use post_title
in case you need to order your posts by title, or post_name
in case you prefer to order your posts by slug. Any other field of the wp_posts
table can be used to order the posts by.
If you don’t add ASC
as the order
value, WordPress orders the posts in a descendant way.