• Hi all,

    Simple question: I’ve got al all page WP-site (so, no posts) and there’s seems to be a problem with feeds. They throw a error 404
    The (HTML) source:

    <link rel=”alternate” type=”application/rss+xml” title=”mysite » Feed” href=”http://www.mysite.com/feed/&#8221; />
    <link rel=”alternate” type=”application/rss+xml” title=”mysite » Comments Feed” href=”http://www.mysite.com/comments/feed/&#8221; />

    I thought I can’t have feeds when using only pages, but maybe I wrong.
    If so, how? And if not, how do I remove the feeds?

    Thanks!

Viewing 4 replies - 1 through 4 (of 4 total)
  • I thought I can’t have feeds when using only pages

    Correct. By default the feeds only contain Posts – not Pages. Try installing a Page RSS feed plugin.

    Thread Starter amj

    (@amj)

    Thanks. And if I decide to not use feeds, whats the best way yo get rid of those rss links? Any ideas? Can I use a hook for that?

    Just remove those lines from your theme’s header.php file. You could also try adding the following to your theme’s functions.php file:

    // Disable feeds
    function my_disable_feed() {
    	wp_die( __('No feed available,please visit our <a href="'. get_bloginfo('url') .'">homepage</a>!') );
    }
    add_action('do_feed', 'my_disable_feed', 1);
    add_action('do_feed_rdf', 'my_disable_feed', 1);
    add_action('do_feed_rss', 'my_disable_feed', 1);
    add_action('do_feed_rss2', 'my_disable_feed', 1);
    add_action('do_feed_atom', 'my_disable_feed', 1);
    Thread Starter amj

    (@amj)

    I just found another way to disable feeds if you are using Yoast WordPress SEO plugin, which I do. Check ‘Hide RSS Links’ in the ‘ Clean up <head> section’.

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

The topic ‘Feeds not working – error 404’ is closed to new replies.