• Resolved blackeye0013

    (@blackeye0013)


    Hello, I’d like to use this plugin only on several specific subpages and on the rest of the site use default WP permalinks. More specifically, I want o use it only for children of one or two parent pages.

    Is this possible and how to do this?

    Looking at the docs, the filter ‘custom_permalinks_exclude_posts’ might be the solution, right? Maybe something like this:?

    function yasglobal_exclude_posts( $post ) {
    if ( 1111 === $post->post_parent; ) {
    return false;
    }

    return true;
    }
    add_filter( 'custom_permalinks_exclude_posts', 'yasglobal_exclude_posts' );

    But as I understad, this only removes the UI from the post detail, it doesn’t stop the plugin from rendering once changed permalink, am I correct? If there are some changes to the permalinks already made, I have to remove them from the custom permalinks list, right?

    Is it possible to remove the whole functionality of the plugin for the specific pages (or vice versa, enable it only for specific pages)?

    Not sure if I should use the filter ‘custom_permalinks_avoid_redirect’. I’ve tried to use it, but it didn’t seem to change anything.

    Thanks for your reply.

Viewing 1 replies (of 1 total)
  • Plugin Author Sami Ahmed Siddiqui

    (@sasiddiqui)

    @blackeye0013 If you’ve already set custom permalinks, you’ll need to delete them manually from the Permalinks settings page.

    This filter basically removes the option to edit custom permalinks directly from individual post/page edit screens. It keeps the plugin functionality on the backend, but hides it from the front-end editing interface.

    Want the plugin to only work on the admin side?

    This filter can be used to specify which content types (identified by their slugs) the plugin should actually modify. For any content type not included, the plugin won’t do anything and will leave the permalinks as they are.
    https://github.com/samiahmedsiddiqui/custom-permalinks/?tab=readme-ov-file#exclude-permalink-to-be-processed

Viewing 1 replies (of 1 total)
  • The topic ‘Is it possible to use this plugin only on specific subpages?’ is closed to new replies.