Get list of all Grandchild Pages

My current idea is: Use get_pages to get all of the descendants of TOP and put the IDs in an array arrayAll. Then run get_pages again with parent=1 to get just the direct children of TOP. Put these in array arrayChildren. Run in php arrayGrandchildren = array_diff(arrayAll, arrayChildren) to get a list of all pages … Read more

WordPress Page Protect forwards to Admin Login

I can confirm that Password Protected pages still work as normal in 3.4.1. The password protect form does submit the password to /wp-login.php?action=postpass where that file deals with authentication. Upon successful or failed login the file will redirect you back to the page the user was on. One thing to be aware of is that … Read more

create 2 custom columns in page edit in Admin panel

functions attached to manage_pages_custom_column get fired for every custom column, you have to check the name of the column within the function to only output data for that specific column: add_action( ‘manage_pages_custom_column’, ‘AddColumnValue’, 10, 2 ); function AddColumnValue( $column_name, $post_id ) { if( ‘thumbnail’ == $column_name ): echo ‘Header Image data here’; elseif( ‘cssColor’ == … Read more