List pages to show only Whitelisted sub pages

The easiest thing to whitelist page IDs for wp_list_pages() is to use a self removing/single time running filter callback inside get_pages(), which is the function retrieving the data from either Cache or from a fresh query to the DB. You have several options in there: Filter the final DB result To filter the list of … Read more

Trying to store submenu items to render out after main menu

Yesterday I had the same kind of problem and I decided to ditch the walker alltogether and use the wp_get_nav_menu_object and wp_get_nav_menu_items functions instead. If you var_dump($menu_items) you can see which properties are available. Here’s a snippet of my code that builds the menu named ‘main’ for my twitter bootstrap menu: $menu_name=”main”; // name of … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)