how are those ‘archival’ pages defined?
there is a filter applied to the ‘Parent’ page list arguments, which you might be able to use to exlude pages from the list.
i.e., if you hve a list of page IDs to be excluded, try this example code, to be added to functions.php of your theme:
add_filter( 'page_attributes_dropdown_pages_args', 'page_attributes_parent_exclude_archival_pages' );
function page_attributes_parent_exclude_archival_pages( $args ) {
$args['exclude'] = array( 2, 713, 2059 );
return $args;
}
Thank you Michael
I am not very technical but assume ( 2, 723, 2059) are page ID’s?
Yes I can try that.
Where you mention _archival_ pages: currently these pages are just ordinary pages – what does “archival” mean in this context?
Thank you!
what does “archival” mean in this context?
I am just using your words:
a lot of pages that are archival.
what I meant to find out was, do these pages have anything in common which could be used to automatically get all of them, without needing to find each page ID?
At the moment they are organized in quarterly groups:
Page title: Stories Jan-Mar 2016 with say 20 individual pages with Stories Jan-Mar 2016 as the Parent.
Then another page: Stories Apr-May 2016 with all its individual pages.
And so on.
There is really nothing to distinguish them from any other page on the site.
These pages do not need any more editing as they are just stored on the site in case someone wants to see them.
Thanks
Thanks Michael – that worked!
I wonder if something similar could be applied to widgets? For example, left-sidebar widgets that don’t need to be edited anymore; what sort of hook could be applied to them to remove them from the drop-down list of widgets.