Admin Menu Tree Page View (CMS)
Admin Menu Tree Page View
The Admin Menu Tree Page View plugin adds a tree-view layout to your pages - directly accessible in the admin menu. This way, all your content will be available with just one click, no matter where you are in the admin area.
You can also add pages directly in the tree and you can quickly find your pages by using the real-time search box.
Thanks for using my plugin!
Hi there! Thanks for using my plugin. I hope you like it as much as I do.
— Ciprian Popescu - plugin creator
I like this plugin - how can I thank you?
There are several ways for you to show your appreciation:
- Give it a nice review over at the WordPress Plugin Directory
- Give a donation - any amount will make me happy
- Post a nice tweet or write a nice blog post about the plugin
Support
Please see the support forum for help.
Homepage
More WordPress plugins
☕ Buy me a coffee
true,
];
$output = 'objects';
$operator = 'and';
$post_types = get_post_types( $args, $output, $operator );
unset( $post_types['attachment'] );
?>
$post_type,
'parent' => 0,
'post_parent' => 0,
'numberposts' => -1,
'orderby' => 'menu_order',
'order' => 'ASC',
'post_status' => 'any',
'suppress_filters' => true, // 0 is supposed to fix problems with WPML, but we want to keep it true to avoid caching
];
$args = wp_parse_args( $args, $defaults );
// Contains all page IDs as keys and their parent as the value
$arr_all_pages_id_parent = amtpv_get_all_pages_id_parent();
$pages = get_posts( $args );
$output = '';
$str_child_output = '';
foreach ( $pages as $one_page ) {
$edit_link = get_edit_post_link( $one_page->ID );
$title = get_the_title( $one_page->ID );
$title = esc_html( $title );
// add num of children to the title
// @done: this is still being done for each page, even if it does not have children. can we check if it has before?
// we could fetch all pages once and store them in an array and then just check if the array has our id in it. yeah. let's do that.
// if our page id exists in $arr_all_pages_id_parent and has a value
// so result is from 690 queries > 474 = 216 queries less. still many..
// from 474 to 259 = 215 less
// so total from 690 to 259 = 431 queries less! grrroooovy
if ( in_array( $one_page->ID, $arr_all_pages_id_parent ) ) {
$post_children = get_children(
[
'post_parent' => $one_page->ID,
'post_type' => $post_type,
]
);
$post_children_count = sizeof( $post_children );
$title .= "