Disable CSS file and all features apart from Redirections

#852016
  • Resolved James
    Rank Math free

    Hi,

    I am only using Rank Math for the Redirections module, and we have our own custom solution for SEO tags etc.

    I want to be able to deactivate every feature, and also only show the Redirections menu item.
    I have set up the rank-math.php file in the root of my theme, and have tried ‘remove_all_actions(‘rank_math/head’);’. This has cleared the Rank Math SEO tags which are generated, but there is still a frontend CSS file related to Rank Math being added. Also, the page seems to be taking on the default page title from the Rank Math settings, which I need to disable.

    Thanks,
    James

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hello,

    We apologize for the issue you are facing with Rank Math. To disable all features except for the Redirections module, you can follow these steps:

    1. Disable Rank Math CSS: You can remove the Rank Math CSS file by adding the following code snippet to your rank-math.php file:

      add_action( 'wp_enqueue_scripts', function() {
         wp_dequeue_style( 'rank-math' );
      } );
    2. Disable All Features: To ensure that all other features are disabled, you can use the following code snippet in your rank-math.php file:

      add_filter( 'rank_math/disable_features', '__return_true' );
    3. Keep Only Redirections: To keep only the Redirections feature active, you can add this filter:

      add_filter( 'rank_math/redirections/enabled', '__return_true' );
    4. Disable Default Page Title: If the default page title from Rank Math settings is still being applied, you may need to ensure that you are not using any Rank Math filters that set the title. You can also try overriding the title in your theme or using a custom function to set it as needed.

    After adding these snippets, make sure to click the Update File button to save your changes.

    If you still encounter issues or have further questions, please feel free to reply to this ticket, and a human agent from the Rank Math Support team will assist you further.

    Thank you for raising this concern!

    Sources:
    How to Disable All Rank Math Generated SEO Tags » Rank Math
    How to Disable Custom Product Redirection in Rank Math » Rank Math
    How to Disable Rank Math SEO Content Tests » Rank Math

    James
    Rank Math free

    This removed the CSS file, but all the features seem to still be active. I only want the Redirection part of the plugin.

    Hello,

    Thank you for contacting us. We apologize for any inconvenience this issue may have caused.

    You can disable any Rank Math module you do not intend to use from WordPress Dashboard > Rank Math SEO > Dashboard.

    Please share a screenshot of the features you noticed are still added by Rank Math.

    You can use this tool to share a screenshot with us: https://imgur.com/upload

    We look forward to hearing back from you.

    Thanks.

    Hello,

    Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.

    If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.

    Thank you.

Viewing 3 replies - 1 through 3 (of 3 total)

The ticket ‘Disable CSS file and all features apart from Redirections’ is closed to new replies.