Skip to content

Instantly share code, notes, and snippets.

@wpmark wpmark/wp-query-example.php Secret
Created Sep 9, 2018

Embed
What would you like to do?
A simple example of using WP_Query
<?php
// run a query for the latest 10 jobs.
$jobs = new WP_Query(
array(
'posts_per_page' => 10,
'post_type => 'wpmark_job',
)
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.