Prevent “public querying” and “archiving” of custom sidebars
-
Hello,
Firstly, I’d like to say that your plugin is very useful!
I’ve noticed that the plugin creates URLs and archives for custom sidebars. While this might be intended behavior, I believe it could be beneficial to prevent public querying and archiving for these custom sidebars by default. This would help in avoiding unnecessary URLs and potential SEO issues.
To address this on my end, I’ve added the following snippet:
add_filter( 'register_post_type_args', 'modify_bsf_sidebar_cpt', 10, 2 ); function modify_bsf_sidebar_cpt( $args, $post_type ) { if ( 'bsf-sidebar' === $post_type ) { $args['publicly_queryable'] = false; $args['has_archive'] = false; } return $args; }
I thought it might be worth suggesting this as a potential enhancement to the plugin’s core functionality. It could provide a cleaner setup for users who might not want these sidebars to be publicly accessible.
Thank you for your time and consideration.
Regards,
- The topic ‘Prevent “public querying” and “archiving” of custom sidebars’ is closed to new replies.