Does CMS systems like Orchard or WordPress have RSS feed for comments? - wordpress

I would like to aggregate posts from different already existing blogs on my website. I want to show blog title and number of comments. The blogs already exists and I don't own them.
Do the most common CMSs provide RSS feed for comments by default so I can show number of comment next to each blog post?

Well, Orchard supports the generation of RSS feeds on any content type, not just posts and comments, but by default, comment feeds are not typically exposed on blogs managed by Orchard. You'd need the cooperation from the person managing the blog so that they add it.
In general, it's easy to discover what feeds any site exposes no matter what CMS (if any) is used to manage it. Just view the source, and look for link tags with type="application/rss+xml" attribute. The href on those tags points to the feeds.

I can only reply for wordpress, and the answer is Yes ...
( although probably true for most CMS )
The wordpress comments RSS feed url can be retrieved via
<?php bloginfo('comments_rss2_url'); ?>
For a single post it would be a template tag
<?php post_comments_feed_link('RSS 2.0'); ?>
The site comments default URL would be
http://example.com/?feed=comments-rss2
And you can even control the single post comment link with
post_comments_feed_link( $link_text = 'link_text', $post_id = 'post_id',
$feed = 'feed_type' );
You can read more about wordpress feeds in the mighty CODEX

Related

web stories category links not working in WordPress

I have used the below code to display the web stories category-wise,
But the links not working. its returns to a 404 page
`<form action=”<?php bloginfo(‘url’); ?>/” method=”get”><?php
$select = wp_dropdown_categories(‘show_option_none=Select Category&show_count=1&orderby=name&taxonomy=web_story_category&echo=0&selected=6′);
$select = preg_replace(“#<select([^>]*)>#”, “<select$1 onchange=’return this.form.submit()’>”, $select);
echo $select;
?></form>
The web_story_category taxonomy in the Web Stories plugin is not currently marked as public, which means it can't be used to link to individual category term archives. You'd need to either use a custom taxonomy, filter the taxonomy args to make it public, or wait for a plugin update that does this.

Yoast plugin is not showing meta description and meta keyword

I am a newbie and learning new things every now and then. I recently set up Yoast on my WordPress website and I put title, focus keyword, and meta description for every single page of my website manually in Yoast widget. This shows up under the page but unfortunately the meta description and keywords is not appear on the page source.
In fact throughout the website same title and description is displayed. Is there any additional configuration required after installation of Yoast in header.php or somewhere in files?
You can add code to functions.php for showing focus keywords as meta-keywords in section of the page.
function set_head_keywords() {
$id = get_the_ID();
if (!$id) return;
$meta = get_post_meta( $id, '_yoast_wpseo_focuskw', true );
echo '<meta name="keywords" content="'.$meta.'" />';
}
add_action( 'wp_head', 'set_head_keywords' );
Answer from Yoast seo plugin is stated below:
We’ve removed the meta keywords feature in Yoast SEO from version 6.3. Meta keywords haven’t had a use for a long time, so their removal from our plugin has been long overdue.
Reference: https://kb.yoast.com/kb/meta-keywords-yoast-seo/
Google:
Google does not use the keywords meta tag in web ranking.
Reference: https://webmasters.googleblog.com/2009/09/google-does-not-use-keywords-meta-tag.html
Yahoo! Announced they no longer use the meta keywords tag anymore either.
Bing:
On 2014: Today, it’s pretty clear the meta keyword tag is dead in terms of SEO value. Sure, it might have value for contextual ad systems or serve as a signal to ‘bots plying the web looking for topics to target, but as far as search goes, that tag flat lined years ago as a booster.
Reference: https://blogs.bing.com/webmaster/2014/10/03/blame-the-meta-keyword-tag

Soundcloud Wordpress Plugin passing database value into Shortcode

I'm using the SoundCloud plugin for Wordpress. The shortcode format they recommend using is:
[soundcloud]http://soundcloud.com/forss/flickermood[/soundcloud]
I've also searched and found that this format can be used as well:
[soundcloud url="https://api.soundcloud.com/playlists/25121853" params="auto_play=false&hide_related=false&visual=true" width="100%" height="450" iframe="true" /]
Basically my question is how would I pass a database value into the url section of this shortcode. I've used shortcodes for other plugins before which involve the use of key="xxx", but the Soundcloud shortcode seems to need the url="xxx" part.
I'm sorry if this is unclear, it's my first attempt at getting help on stackoverflow.
Many Thanks,
Paul
If you want to do it from the wordpress post editor, you will first have to install "Allow PHP in Posts and Pages" plugin. As you already have the value in your post_meta table, All you have to do in your editor is something like.
[php] echo get_post_meta( $post_id, 'soundcloudlink', TRUE );[/php]
Replace $post_id with the id of your post.

Syndicating custom fields in Wordpress via RSS

I wonder if I could ask a Wordpress / RSS question I could't find an answer for around here,
Trying to syndicate posts via RSS in Wordpress using the FeedWordpress plugin as an RSS aggregator, each post in the original blog includes five custom fields that are important for its Theme functionality (the original and syndicating / receiving blog using the same theme).
The original RSS2 feed doesn't include these custom fields apart from one, being enclosure, that is defined in the default rss feed template (function in WP rss_enclosure).
This is written in the original feed such as:
<enclosure url="http://www.samplevideourl.flv" length="18554755" type="video/x-flv" />
Tried to add the rest of the custom fields modifying the rss2-feed.php template so they show at the end of each segment in the current RSS2 feed, now they are included as for example:
...
<ratings_average>0</ratings_average>
<views>5</views>
</item>
However, if I update the syndicated posts, or delete the posts and fetch the modified feed again with feedwordpress, none of these show in the syndicated posts.
Is there a way to include these custom fields so they are recognized by feedwordpress?
Basically need to syndicate the same format of the post as the original including all its custom fields.
Many Thanks
Carlos
There is a thread that covers this: https://wordpress.stackexchange.com/questions/3801/add-custom-fields-to-custom-post-type-rss
I've condensed the answers there to reflect the later improvements (thanks MikeSchinkel, prettyboymp and Acts7).
Add this to your theme's functions.php:
/* IN ORDER TO VALIDATE you must add namespace */
add_action('rss2_ns', 'my_rss2_ns');
function my_rss2_ns(){
echo 'xmlns:mycustomfields="'. get_bloginfo('wpurl').'"'."\n";
}
add_action('rss2_item', 'yoursite_rss2_item');
function yoursite_rss2_item() {
if (get_post_type()=='my_custom_post_type') {
$fields = array( 'field1', 'field2', 'field3' );
$post_id = get_the_ID();
foreach($fields as $field)
if ($value = get_post_meta($post_id,$field,true))
echo "<mycustomfields:{$field}>{$value}</mycustomfields:{$field}>\n";
}
}
This will add all custom field names and values to the site's main feed.
Note, for custom fields with more than one value, a modification is necessary as the above will only work for single value fields, not arrays.
So,
On your Master site (where you are syndicating FROM) you add the above function.
On the Slave site (where you are syndicating TO), assuming you have FeedWordPress installed, go to "SYNDICATION" ->
Click on the name of the RSS feed
Go to Custom Feed Settings and plug in the pieces

Wordpress multiple / exclusive posting pages

I want a site with a separate News and Blog page, ie only news posts are dispayed on news pages and non news posts on blog pages. Also archive lists, category lists, etc for each page must only display relevant posts. Seems like a common requirement, but using the WP documentation, I keep going around in circles!!! Is there a simple way to do this, without getting into multiple blogs, eg using categories.
Thanks
That's easy.
First, you will need to create custom page template. Refer to this page to see how to create it.
Second, on that page (you can copy from your page.php/index.php, the important part is:
if (have_posts()) : while (have_posts()) : the_post();
Find that piece and add this code just right above that code:
query_posts('cat=3&paged='.get_query_var( 'paged' ));
Things to note from above query_posts snippet is:
cat: this is the category ID you want to query. To easily see what ID is on a particular category, you can use ShowID for Post/Page/Category/Tag/Comment plugin.
paged: Paged will allow your custom page to handle next & prev navigations, which is handled by next_post_link() and prev_post_link(). As for get_query_var( 'paged' ) is function to get what page's page you currently see.
Hope that helped.
<shamelessplug>
I blogged it here (in Bahasa Indonesia, which you can easily translate using google translate).
</shamelessplug>

Resources