Is there any solution for this request? I would like to exclude a page ID, too.
Its actually fairly easy, this is my shortcode, hopefully you will see what I have done: http://pastebin.com/dLcxuvtz
You need to add the exclude parameter in the first part, then use “post__not_in” in your query.
Cheers,
Steve
Hi Steve,
thanks for your code, but unfortunately its not easy for mee .. 🙁
could you pls be a little more specific how to add the exclude paramater and how to use “post__not_in” in the query (of this plugin)?
Like this?
<?php
// default args
$args = array(
'exclude' => ''
);
add_filters('child-pages-shortcode-query', "my_query");
function my_query($args) {
'post__not_in' => explode(",",$exclude)
);
return $args;
}
?>
https://ww.wp.xz.cn/plugins/child-pages-shortcode/
Thank in advance.
Cheers,
John
Sorry, I didn’t use the plugin in the end, I created my own shortcode and put it in my functions file. This led me to be able to style it exactly as my site needed it.
Steve