Page to output sub-pages (children)

You can use for example very basic WP Query (or get_pages or what ever. this is just one example) (http://codex.wordpress.org/Class_Reference/WP_Query) // The Query $currentPageId = $post->ID; // get current page id inside loop $args = array( ‘post_parent’ => $currentPageId, ‘post_type’ => ‘page’, ‘posts_per_page’ => -1 ); $query = new WP_Query( $args ); // The Loop … Read more

get_pages displays only parents instead of children

The problem here is twofold. Firstly, you’re using ‘parent’ => $post->ID,. $post is a global variable, not a super global, so you have to state that you intend to use it before doing so with: global $post; But, as always, it’s easier to use the APIs than to go for the raw data, and you … Read more

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