The Custom Post Type RSS feed plugin looks for post types that have archives enabled. GC Testimonials does not have archives enabled. Here’s a hack to enable archives. In testimonials.php
, find
$testimonial_args = array(
and add this line
'has_archive' => true,
so that whole array looks like
$testimonial_args = array(
'labels' => $testimonial_labels,
'singular_label' => __('testimonial', GCT_NAME),
'public' => true,
'show_ui' => true,
'capability_type' => 'post',
'hierarchical' => false,
'has_archive' => true,
'rewrite' => true,
'menu_icon' => GCT_URL.'/assets/images/icon_16.png',
'menu_position' => 20,
'exclude_from_search' => true,
'supports' => array('title', 'excerpt', 'editor', 'thumbnail')
);
Then check your feed.
Thanks for the response. I did as suggested and I see the RSS feed now, but it is empty. I guess it will populated from now on, and past testimonials will not appear?
Yes, I believe that is how the RSS feed works. To test it, you could add a few fake testimonials, check the feed, then delete them.
I just did on avelim.org.il
The feed is still empty
Bummer. I’ll try to come up with a solution.
I was mistaken. The RSS feed will show older items.
All that plugin does is add <link>
elements for each custom post type to your site. If you view the page source and search for rss+xml
you will find three <link>
s:
<link rel="alternate" type="application/rss+xml" title="מודעות אבל" href="http://www.avelim.co.il/feed/" />
<link rel="alternate" type="application/rss+xml" title="תנחומים" href="http://www.avelim.co.il/comments/feed/" />
and a little further down:
<link rel="alternate" type="application/rss+xml" title="מודעות אבל » Testimonials Feed" href="http://www.avelim.org.il/testimonial/feed/" />
which is a separate feed for your testimonials.
The main feed and the comments feed are built into WordPress. A feed for a custom post type, e.g. mysite.com/testimonial/feed
, should work with has_archive
and public
set to true
which we’ve done, but it’s not added as a <link>
, hence the need for the plugin.
Why add <link>
s at all? To make it easier for feed readers to discover all the feeds on your site.
TL;DR
Try this if you’re looking for a single feed containing both regular posts and testimonials.
I don’t understand. The feed is there but is empty. Do you suggest I do something else?
Perhaps I misunderstood your objective. Let’s back up a bit.
Your main feed avelim.org.il/feed/ is working, yes?
Do you want your testimonials to be included in the main feed or in a separate feed at avelim.org.il/testimonial/feed/?
The testimonial feed failed for me; it redirected to the search page. Whatever is causing that may be the problem.
What do you use to check the feed?
avelim.org.il has 3 feeds: posts, comments and testimonials.
I check the feed content via Google Chrome RSS subscription extension
http://goo.gl/caKFDB
Posts and comments have content in the feed. Testimonials is empty
The Custom Post Type RSS plugin is working properly since that Chrome plugin is finding the feed.
Something is breaking the testimonial feed.
1. Please provide a list of your active plugins.
2. Does your theme include options for managing either testimonials or RSS? If so, what are those settings?
I descativated all tyhe plugins except GC Testimonials and Custom Post Type RSS feed.
I acitvated the theme 2014.
The issue is still there. Testimonials is empty
I’m sorry but that’s all I can do from afar. Something is preventing avelim.org.il/testimonial
and therefore avelim.org.il/testimonial/feed
from being rendered as valid requests.