So this is my code. This piece of code shows me the child page titles. But i'm providing the ID from the parent page. Is there a way to make this dynamic? I don't want to use the ID cuz then its static..
<?php
$childArgs = array(
'sort_order' => 'ASC',
'sort_column' => 'menu_order',
'child_of' => 127
);
$childList = get_pages($childArgs);
foreach ($childList as $child) { ?>
<ul class="menu-items menu-level-1 menu-count-5">
<li class="menu-item item-number-1 item-number-2 item-number-3 item-number-4 item-number-5 item-id-84283 item-odd item-page item-node item-alias-over-ons-de-winkel"><a href=""><?php echo $child->post_title; ?></a></li>
<?php } ?>
get_the_ID()
instead of127
– admcfajn Oct 13 '18 at 16:21