PHP Variables in Template Tags?
-
Trying to build a page menu with wp_page_menu();
I have made a database call to the wp_posts table in the WordPress database, asking for the IDs of pages matching certain conditions. I have put the the IDs into a commaseparated list in a PHP variable and now wants to use wp_page_menu(); like this:
wp_page_menu('include=$IDvariable');
But that returns nothing.
Is it not possible to use PHP variables inside WP Template Tags?
Does anyone have any idea how I get those IDs dynamically into wp_page_menu(); ?
Or other suggestions on how to dynamically build a menu of pages matching certain conditions regarding a specific value in a specific field in the wp_posts database table?
Regards,
Jakob Smith
- The topic ‘PHP Variables in Template Tags?’ is closed to new replies.