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

How to target grandchild of post_parent using wp_list_pages

The correct answer is: $Pages = wp_list_pages(‘child_of=”.($post->post_parent != false ? $post->post_parent : $post->ID).”&title_li=&echo=0&depth=1’); $InnerPages = wp_list_pages(‘child_of=”.($post->post_child != false ? $post->post_child : $post->ID).”&title_li=&echo=0′); $Title = ($post->post_child != false) ? trim(get_the_title($post->post_child)) : trim(wp_title(”, false)); if($Title != ”) $Pages = str_replace($Title.'</a></li>’, $Title.'</a>’. ‘<ul id=”test”><li>Overview</li>’.$InnerPages.'</ul></li>’, $Pages); echo $Pages; unset($Pages, $InnerPages); HOWEVER, I have found a much better solution to … Read more

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