Hi,
I need to list several specific pages from their names but dont know how to do it properly.
The wp_list_pages command seems to only be accepting id´s when using the "include" parameter like:
<?php wp_list_pages('sort_column=menu_order&title_li=&include=172,174,176,345' ); ?>
And the get_page_by_title seems to only allow one page name when including, for example:
<?php
$page = get_page_by_title( 'About' );
wp_list_pages( 'include=' . $page->ID );
?>
How can I include several pages from their names? Something like this:
<?php
$page = get_page_by_title( 'About, Home, News' );
wp_list_pages( 'include=' . $page->ID );
?>
I want to have an answear how to do this. Even the reason doesn´t matter I can tell you why I need this and its because the page-id´s sometimes changes when you are exporting or moving the wordpress site. I know there are some ways to change the page id´s in the database, but I don´t wanna do that. There must be another way to do it simple and clean.
Many thanks
/Yurini