Call an article under a specified category: query_posts ('Category _ name category name'); call an article from a category ID: query_posts ('catid '); you can call multiple parameters. Rderbyrand is randomly ordered. showposts is the number of invoked articles and can be changed as needed. This is critical because query_po
Call the document under the specified category: query_posts ('Category _ name = category name ');
Call an article from a Category ID: query_posts ('cat = ID ');
You can call multiple parameters.
Rderby = random sorting of rand. showposts is the number of articles called and can be changed as needed.
This is critical because the query_posts rule takes effect not only for its next LOOP, but may invalidate other LOOP calls throughout the site. wp_reset_query can be used to clear wp_query rules.
If you want to display only one article on the blog homepage, but want to display links to the last five articles in Category ID 1, use the following code:
Note: When offset is used, the preceding query applies only to the categories containing more than one article; otherwise, the query cannot be output.