• Resolved Sylvain L

    (@reventlov)


    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,

    • This topic was modified 11 months, 1 week ago by Sylvain L.
    • This topic was modified 11 months, 1 week ago by Sylvain L.
    • This topic was modified 11 months, 1 week ago by Sylvain L.
Viewing 1 replies (of 1 total)
  • Plugin Support Herman Asrori (BSF)

    (@bsfherman)

    Hi @reventlov,

    If you think it’s really necessary and can make this plugin even better, I would ask you to create a PR on our GitHub. Our dedicated team will take a look at it further.

    We really appreciate your effort and support. Thanks!

    Kind regards,
    Herman 😊

Viewing 1 replies (of 1 total)
  • The topic ‘Prevent “public querying” and “archiving” of custom sidebars’ is closed to new replies.