ThemeShaper Forums » Thematic

[closed]

RSS feeds in the address bar

(3 posts)
  • Started 4 years ago by xxxevilgrinxxx
  • Latest reply from xxxevilgrinxxx
  • This topic is resolved
  1. I've managed to add my feedburner feed to the RSS dropdown in the address bar

    //rss feeds in address bar
    function childtheme_rssfeeds($content) {
    	$content .= "\t";
    	$content .= "<link rel=\"alternate\" type=\"application/rss+xml\" href=\"";
    	$content .= "http://feeds.feedburner.com/qwstnevrythg/2";
    	$content .= "\" title=\"";
    	$content .= wp_specialchars(get_bloginfo('name'), 1);
    	$content .= " " . __('RSS feed', 'thematic');
    	$content .= "\" />";
    	$content .= "\n";
    	return $content;
    }
    add_filter('thematic_rss', 'childtheme_rssfeeds');

    What I would like to do is remove the WordPress feeds from the address bar. Help? :D

    Posted 4 years ago #
  2. This whole feed thing is really a pain in the rear. I think that is why most people fall back on using plugins like Feedsmith or manual htaccess redirects. I can appreciate wanting to do it in a precise way so here goes:

    // remove all WP's index main feed & comments feed links
    remove_action('wp_head','feed_links');
    
    // remove WP's comments feed link for is_singular
    function remove_wp_comments_feed_link() {
    }
    add_filter('post_comments_feed_link','remove_wp_comments_feed_link');
    
    // remove all the other WP's feed links
    remove_action('wp_head','feed_links_extra');
    
    // remove thematic's duplicate comments feed link
    function remove_thm_comment_feed_link() {
    	return FALSE;
    }
    add_filter('thematic_show_commentsrss','remove_thm_comment_feed_link');
    
    // Add custom rss feed link to replace thematic's main feed link
    function childtheme_rssfeeds() {
    	$content = "\t";
    	$content .= "<link rel=\"alternate\" type=\"application/rss+xml\" href=\"";
    	$content .= "http://feeds.feedburner.com/qwstnevrythg/2";
    	$content .= "\" title=\"";
    	$content .= wp_specialchars(get_bloginfo('name'), 1);
    	$content .= " " . __('RSS feed', 'thematic');
    	$content .= "\" />";
    	$content .= "\n";
    	return $content;
    }
    add_filter('thematic_rss', 'childtheme_rssfeeds');

    I think that covers everything. Home , singulars, archives, the works.

    -Gene

    Posted 4 years ago #
  3. you're an angel, em hr :D
    I've been using the feedburner plugin but I've been looking at using far fewer plugins and trying to learn more php...or at least learning what to copy!

    This works beautifully, so thank you!

    Posted 4 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.