WordPress.org

Ready to get started?Download WordPress

Forums

disabling the RSS Feed for CMS solution (3 posts)

  1. loru88
    Member
    Posted 3 years ago #

    Hi all
    it's my first question here and sorry for my english...
    I'm using WP as a CMS because it is very simple but i don't need the feed RSS, so I want to remove this service. Could you show me some trick or hack also in the core of WP? Or maybe some working plugin because I have tried anyone but no one work...

    I noticed that if I remove this two lines in the head section

    <link rel="alternate" type="application/rss+xml" href="http://localhost:8888/wordpress/feed/" title="Lorenzo latest posts" />
    <link rel="alternate" type="application/rss+xml" href="http://localhost:8888/wordpress/comments/feed/" title="Lorenzo latest comments" />

    maybe it work, but I don't know if it is correct and where I can find the function tha put these line

    please help
    thanks

  2. Samuel B
    moderator
    Posted 3 years ago #

    /wp-includes/feed.php

    how to disable feeds without hacking core files
    http://wpengineer.com/287/disable-wordpress-feed/

  3. loru88
    Member
    Posted 3 years ago #

    very thank!

    this code work but it remove all the feed

    <?php
    remove_action( 'wp_head', 'feed_links_extra', 3 ); // Display the links to the extra feeds such as category feeds
    remove_action( 'wp_head', 'feed_links', 2 ); // Display the links to the general feeds: Post and Comment Feed
    remove_action( 'wp_head', 'rsd_link' ); // Display the link to the Really Simple Discovery service endpoint, EditURI link
    remove_action( 'wp_head', 'wlwmanifest_link' ); // Display the link to the Windows Live Writer manifest file.
    remove_action( 'wp_head', 'index_rel_link' ); // index link
    remove_action( 'wp_head', 'parent_post_rel_link', 10, 0 ); // prev link
    remove_action( 'wp_head', 'start_post_rel_link', 10, 0 ); // start link
    remove_action( 'wp_head', 'adjacent_posts_rel_link', 10, 0 ); // Display relational links for the posts adjacent to the current post.
    remove_action( 'wp_head', 'wp_generator' ); // Display the XHTML generator that is generated on the wp_head hook, WP version
    ?>

    and what about if I want to remove only the comments feed?
    I don't need them and I don't want them

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags