How to Disable RSS Feed Links in the WordPress Header

How to Disable RSS Feed Links in the WordPress Header

If we have previously disabled the WordPress RSS Feed, this article will discuss how to disable RSS Feed links in the WordPress header so that no more links point to the RSS Feed page on WordPress pages or articles.

Cara Disable Link RSS Feed di Header WordPress - 0

However, before discussing this method, ensure you have access to the WordPress dashboard as an admin or another role that can change themes, or have FTP access to modify active theme files.

However, in this article, we will discuss how to make changes through the WordPress dashboard, which requires access as an admin user or another role with permissions to use the theme file editor.

Let's get started. To disable RSS Feed links in the WordPress header, you can follow these steps

  1. Log in to the WordPress dashboard, which is usually accessible via https://namadomain.tld/login1 or https://namadomain.tld/wp-login.php
    Cara Disable Link RSS Feed di Header WordPress - 1
  2. Once you are on the WordPress dashboard page, you can open the menu Appearance > Theme file editor
    Cara Disable Link RSS Feed di Header WordPress - 2
  3. Find and edit the file functions.php or Theme function
    Cara Disable Link RSS Feed di Header WordPress - 3
  4. Add the following line of code at the very end, then save the changes
// Disable link ke RSS Feed.remove_action('wp_head', 'feed_links', 2 );remove_action('wp_head', 'feed_links_extra', 3 );
Cara Disable Link RSS Feed di Header WordPress - 4

After you add the code above, the RSS Feed link will no longer be displayed when you check the source code of an article or page.

Cara Disable Link RSS Feed di Header WordPress - 5

That is an easy way to remove the RSS Feed from the WordPress header that you can try. However, when using this method, the RSS Feed can still be accessed directly via the /feed page, for example https://namadomain.tld/feed

  1. Replace namadomain.tld with your own domain name, for example wpgan.com ↩︎

Written by

Muhammad Khoirun Nasikin

I enjoy tinkering with WordPress, hosting, VPS, web development, and various small experiments related to websites. I have over 3 years of experience in the web hosting industry.

COMMENTS

Loading...