I would like to create a custom query ID (to use in Elementor) to get siblings pages of the current page + the parent page of the current page.
For now I get only siblings pages (without the parent page) with this code :
add_action( 'elementor_pro/posts/query/my_custom_filter2', function( $query ) {
$parent_page = wp_get_post_parent_id( get_the_ID() );
$query->set( 'post_parent', $parent_page );} );
I am sure it is not so difficult but I am a beginner and I can't find the solution...
Thank you very much for any help
Quentin
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745622915a4636630.html
评论列表(0条)