How to disable plugin on a single page

#8898
  • Resolved Jason Saunders
    Rank Math free

    Hi there,

    Just wondering if it’s at all possible to disable this plugin on a specific page?

    My developer has written a bit of code to create dynamic page titles for a specific page based on different on page filters.

    Installation of your plugin seems to override this 🙂

    Best
    Jason

    • This topic was modified 5 years, 6 months ago by Jason Saunders. Reason: Support requested admin access to site to test
Viewing 15 replies - 1 through 15 (of 20 total)
  • Todd
    Rank Math free

    Hi Jason,

    Thanks for getting in touch with us.

    You can use this code to disable Rank Math on a specific page:

    if( is_page( 'ID_OF_THE_PAGE' ) ) {
        remove_all_actions( 'rank_math/head' );
    }

    Hope that helps and please do not hesitate to let us know if you need our assistance with anything else.

    Thanks for your help but strangely that didn’t work. Could there be a reason that might be the case?

    Hi Jason,

    Thanks for the follow up.

    We might need to take a closer look at the settings. Please edit the first post on this ticket and include your WP logins in the designated Sensitive Data section along with a link to the page that you would like to disable the functionality on.
    Sensitive Data Section

    It is completely secure and only our support staff has access to that section. If you want, you can use the below plugin to generate a temporary login URL to your website and share that with us instead:

    https://wordpress.org/plugins/temporary-login-without-password/

    You can use the above plugin in conjunction with the WP Security Audit Log to monitor what changes our staff might make on your website (if any):

    https://wordpress.org/plugins/wp-security-audit-log/

    We really look forward to helping you.

    Hello,

    I have updated the sensitive data as requested. Can you please check further?

    Thank you.

    Hi there,

    Thanks for the access.

    The account that you created is quite limited, I am only able to access the custom account dashboard and not the backend admin UI.
    Please elevate the access to an administrator so that we can be able to access and edit theme files.

    We are looking forward to helping you. Thank you.

    The user role is an admin role. We have just created a block on the wp-admin login screen to stop users attempting to login to our admin.

    After logging in please paste this in the browser:

    https://rize.fashion/wp-admin/users.php

    You will then be taken to the admin area.

    Best
    Jason

    Hi Jason,

    Thanks for the follow up.

    I am afraid that I was unable to make changes to your theme, could you please check whether wrapping the code in the following action via FTP will have an effect on this issue?

    add_action( 'after_setup_theme', 'rankmath_disable_features' );
    function rankmath_disable_features() {
    if( is_page( '1161' ) ) {
        remove_all_actions( 'rank_math/head' );
    }
    }

    If there is no change, please share some temporary FTP access so that we can investigate further.

    Thank you.

    Thanks Michael

    I added the code to the functions.php file and no change.

    What do you need to further investigate?

    Best
    Jason

    Hey Michael

    Just wanted to follow up and check if there’s anything further you could suggest trying?

    Best
    Jason

    Hi Jason,

    Apologies for the delay.

    The following code should be able to do the trick for you:

    add_action( 'wp_head', 'rankmath_disable_features',1);
    function rankmath_disable_features() {
    if( is_page( '1161' ) ) {
        remove_all_actions( 'rank_math/head');
    }

    We regret any inconvenience caused by the delay.

    Thanks Michael but unfortunately that just broke the page 🙁

    Hi there,

    Thanks for sharing your results.

    This code works correctly on my end, it is likely that there is some other code that may be causing this issue.
    Please share some temporary FTP access so that we can help you further.

    Thank you.

    Thanks Michael. Would it be helpful if I sent you the code from my function.php file?

    Hi Jason,

    No problem, please share the file via https://pastebin.com/

    I am looking forward to helping you. Thank you.

    I think I’ve done that correctly Michael but let me know if not.

    Here’s the URL:

    https://pastebin.com/c2wgFXZp

    Best
    Jason

Viewing 15 replies - 1 through 15 (of 20 total)

The ticket ‘How to disable plugin on a single page’ is closed to new replies.