Wordpress RSS feed with custom description? - wordpress

Is there a nice and simple way to add a filter to the wordpress RSS feed functions?
I want to insert some custom text into the <description> tag of my RSS2 feed and the <summary> tag of my Atom feed. Is there any easy way to do that?
I don't have templates for my feeds in my theme (like wp-rss2.php or wp-atom.php). I've just added the normal
<link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> Atom Feed" href="<?php bloginfo('atom_url'); ?>" />
to my <head>
Any idea how I can influence the description and summary of my feeds?

There's several options depending on your comfort/experience level:
Install a plugin like Feed Wrangler or Ozh Better Feed
Use a 3rd party service like Feedburner
Hook into the feed using various PHP functions
Or edit the feed output

Related

WooCommerce Remove WordPress Header lines

I am just about to launch an eCommerce site using WordPress and WooCommerce and trying to tidy up the source code and strip out all the WordPress header lines.
The site is pure eCommerce with a blog for users and search engines, I believe the functions below are for a pure blog website.
<link rel="profile" href="http://gmpg.org/xfn/11"/>
<link rel="pingback" href="http://www.domain.co.uk/xmlrpc.php"/>
<link rel="EditURI" type="application/rsd+xml" title="RSD" href="http://www.domain.co.uk/xmlrpc.php?rsd"/>
<link rel="wlwmanifest" type="application/wlwmanifest+xml" href="http://www.domain.co.uk/wp-includes/wlwmanifest.xml"/>
Does anyone know what is required from the above for WordPress to function? And how we can remove these from WordPress, if we can?
Thanks Kindly.
J
You can safely remove all of these from your header.php file. They aren't required for the site to function.
More info: In HTML5, the "profile" attribute was dropped.
The others are purely optional.
For de-registering the bottom two, you'll need to add some new lines to your functions.php:
remove_action('wp_head', 'rsd_link');
remove_action('wp_head', 'wlwmanifest_link');
These functions, from the wp_head action hook, can be viewed in wp-includes/general-template.php, starting on line 2190.
From this file, rsd_link "display(s) the link to the Really Simple Discovery service endpoint."
The wlmanifest_link "display(s) the link to the Windows Live Writer manifest file." If you don't use Windows Live Writer, there's no need for this.

Want To Fix RSS Feed

My blog rss feed is located at - Online Income Startup
http://www.onlineincomestartup.com/
But the feed is not being detected in some sites. Please guide me on how to fix the feed to make sure everything is working fine.
try add this in the head tag:
<link rel="alternate" type="application/rss+xml" href="http://www.onlineincomestartup.com/feed/" title="Online Income Startup" />

Link from single post page to index page

In Wordpress, is there an official way to link from a single post view to that post type's index view? I'm working with custom post types. I've googled around for a wordpress function but there doesn't seem to be one for this and I'd like to avoid hardcoding a URL.
Thanks!
<a href="<?php bloginfo('url'); ?>" > Home </a>

Is there a Feedburner plugin for Wordpress that will change the RSS <link /> tags on the pages

I'm looking for a Feedburner plugin for Wordpress that redirects feeds to Feedburner, but also changes the RSS links that are embedded on the Wordpress pages to point to Feedburner. The plugins I've tried will redirect the RSS feed, but none of them change the embedded RSS tags. So in Safari, for instance, when you click the RSS button, it pulls from the Wordpress feed (instead of Feedburner).
As I recall Wordpress does not offer an api that allows you to modify the RSS links. However, you can remove them completely and then add back in your own. This WP support post is where I got the following info.
Add the following to your functions.php in your theme directory
//remove the feeds for pages
remove_action( 'wp_head', 'feed_links_extra', 3 ); // extra feeds such as category
remove_action( 'wp_head', 'feed_links', 2 ); // general, post and comment feeds
//explicitly add feedburner link back into head
add_action('wp_head', 'addFeedburnerLink');
function addFeedburnerLink() {
echo '<link rel="alternate" type="application/rss+xml" title="RSS 2.0 Feed" href="http://feedburner.com/myfeedburnerurl" />';
}
Hope that helps! You should also checkout http://wordpress.stackexchange.com . They tend to do a much better job with Wordpress codex/plugin related questions over there.

Which link type to use for FeedBurner SmartFeed

Searching for the correct answer all day, and nobody seems to know, so I thought I'd give it a shot here as a last effort before I keel over.
FeedBurner's SmartFeed service does this:
Translates your feed on-the-fly into a
format (RSS or Atom) compatible with
your visitors' feed reader
application.
Based on the above information, which would be correct to add to my <head> section? The difference being the type="foo" sections?
<link rel="alternate" href="<?php echo feedburner_url(); ?>"
type="application/rss+xml" title="FooBar RSS News Feed" />
or...
<link rel="alternate" href="<?php echo feedburner_url(); ?>"
type="application/atom+xml" title="FooBar Atom News Feed" />
or possibly even both?
Can't find the answer anwywhere. Google (owns FeedBurner), Google groups, FeedBurner help, etc. And FB conveniently doesn't have any type of help system. Maybe that's a hint? =)
I'd think you could use either or both at the same time.
What should happen is that the user's feed reader will make an HTTP request with the 'Accept:' header indicating what type of feed it wants (application/atom+xml or application/rss+xml). Feedburner would then look at the Accept header and serve up the appropriate type for you.
I think you are fine with putting both up. Feed readers are smart enough nowadays to figure out how to get the feed in a format it can easily use.

Resources