I’ve a customized loop for displaying little one pages of the present web page, however I would like to permit the WP person to enter web page IDs to be excluded from the loop, utilizing Superior Customized Fields.
My present loop is as follows. It nearly works, besides it solely excludes the primary web page ID within the record:
<?php
$exclude_ids = get_field('exclude_pages');
$args = array (
'post_type' => 'web page', // customized publish kind
'post_parent' => $post->ID,
'orderby' => 'menu_order title',
'order' => 'ASC',
'posts_per_page' => -1,
'post__not_in' => array( $exclude_ids )
);?>
And the Superior Customized Area is about as a textual content subject, with no formatting. In that father or mother web page, I’ve entered the web page IDs within the ACF subject as 2147,2145
(no quotes, no parenthesis).
Curiously, after I echo the variable, it reveals the web page IDs accurately, but it surely’s simply not working when it is a part of the array…?
What am I doing fallacious?
Thanks!!!
C