• Hey,

    How does one pass a WP internal variable, like the page id, to a WP function? I’d like to use the wp_list_pages but exclude the current page. I’ve tried

    <?php wp_list_pages(‘exclude=’ . $page->ID); ?>

    and

    <?php wp_list_pages(‘exclude=’ . $id); ?>

    and

    <?php wp_list_pages(‘exclude=’ . the_id()); ?>

    But none seem to work. Is this possible?

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)

The topic ‘How to pass a WP parameter to a wp function?’ is closed to new replies.