Thread Starter
geecue
(@geecue)
O.k. Can someone just give me the page and approximate area that I can write my own query with shortcode?
Thanks,
Bryan
Hi,
I guess since this was a month ago you may have solved it, but just in case not, I’ve just done something similar – introduced two new parameters, before and after (in lcp-cat-posts.php, in the default settings: ‘before’ =>”,after=>”,)
Then in include/lcp-catlist.php just before LCP makes the query (look for $query = new WP_Query;) I’ve added the query I want to the $args. See WordPress Codex WP Query for details of the various parameters. Here’s an example:
$args[‘date_query’]=array(
‘relation’ => ‘OR’,
array(
‘column’ => ‘post_date_gmt’,
‘after’ => $this->params[‘after’],
‘before’ => $this->params[‘before’]
),
array(
‘column’ => ‘post_modified_gmt’,
‘after’ => $this->params[‘after’],
‘before’ => $this->params[‘before’]
),
‘inclusive’ => true,
);
Hope this helps. Will be interested to learn if there are other ways of doing it as hacking the plugin code is not great from the point of view of maintainability.