When I post a private post, it displayed in RSS, how to avoid that happen?
When I post a private post, it displayed in RSS, how to avoid that happen?
And how to show private links in sidebar when I login?
Are you logged in or logged out when you see the private post in the RSS feed?
I don't know how to login/logout with RSS reader. The RSS reader that I use haven't that option
About private links, I found 2 paramters: show_private & hide_invisible.
But it does not work as I expected. I just want it visible when I login, NOT EVERYONE.
Now, I know how to make private links visible when I login.
In wp-includes/bookmark.php, modify function get_bookmarks(), change this:
$visible = '';
if ( $hide_invisible )
$visible = "AND link_visible = 'Y'";
to:
global $user_ID;
$visible = '';
if ( $hide_invisible )
$visible = "AND (link_visible = 'Y' OR link_visible = 'N' AND link_owner = '{$user_ID}')";In the same way, I can make private page visible too when I login.
In wp-includes/post.php, modify function get_pages(), change this:
$query = "SELECT * FROM $wpdb->posts $join WHERE (post_type = 'page' AND post_status = 'publish') $where "
to:
global $user_ID;
$query = "SELECT * FROM $wpdb->posts $join WHERE
(post_type = 'page' AND (post_status = 'publish' OR post_status = 'private' AND post_author = '{$user_ID}')) $where ";To make posts visible in previous_post_link/next_post_link, in wp-includes/link-template.php,modify function get_adjacent_post(), change this:
$where = apply_filters( "get_{$adjacent}_post_where", $wpdb->prepare("WHERE p.post_date $op %s AND p.post_type = 'post' AND p.post_status = 'publish' $posts_in_ex_cats_sql", $current_post_date), $in_same_cat, $excluded_categories );
to:
global $user_ID;
$where = apply_filters( "get_{$adjacent}_post_where", $wpdb->prepare("WHERE p.post_date $op %s AND p.post_type = 'post' AND (p.post_status = 'publish' OR p.post_status = 'private' AND p.post_author = '{$user_ID}') $posts_in_ex_cats_sql", $current_post_date), $in_same_cat, $excluded_categories );And also, there's a patch & plugin to make posts visible in archive and calendar:
http://me.abelcheung.org/devel/show-private-posts-in-wordpress/
http://trac.wordpress.org/ticket/7155
But I still don't how to make private posts INVISIBLE in RSS reader.
Anyone can give me some tips?
Finally, I know how.
Edit wp-includes/feed-rss2.php, add a conditional statement outside <item></item>:
<?php if ( get_post_status() != 'private') { ?>
<item>
......
</item>
<?php } ?>@funbsd:
I don't know how to login/logout with RSS reader. The RSS reader that I use haven't that option
I meant were you logged in to your WordPress install when you checked the rss and you saw the private posts. My apologies if that was unclear.
I am glad that you got it fixed. Altough I am curious how the problem got there in the first place, and if this is an individual install/
theme problem or a bug.
Sorry, my english is poor. I still not very clear what you mean:(
I just want to see my private pages & links, not only in /wp-admin, but also in / (home page).
And I don't want my private post visible when someone read it from RSS READER. By default, private post is not visible from webpage, but it's visible from RSS READER.
I installed a individual theme - devart. I don't know if it's theme's problem or a bug. But I make it work finally.
I paste what I found here, hope it's helpful to someone. Or somenone can give me some better advice.
Dolphin, Thank you for your help, anyway.
I just wrote this new plugin, it may apply to your case. It allows you to create "low profile" posts that are optionally hidden from the front-page and/or from RSS feeds. Please check it out and let me know if you found it useful.
--
Robert
http://robertmahfoud.konceptus.net/
This is absolutely ridiculous! I cannot believe PRIVATE POSTS are completely viewable via Google Reader, etc.! How obnoxious! Wow...
I tried to use the feed-rss2.php update above and so far...nothing. The "PRIVATE" posts are still showing up in READER!? HELP?
I'm having the same issue. I've tried to add code to the feeds-xxx.php files and google reader is still showing them. However, if I go straight to the feed on http://www.site.com/feed they don't show up. I'm at a loss as to what exactly is going on.
Hopefully, someone knows but by the looks of this thread I'm not going to get my hopes up.
So I think I found a way around this issue. Use Feedburner! :) It will actually hide the feeds that you want to hide. :)
Ok .. I am not sure if this is an issue or not.
If you log into wordpress you do see the private post in the rss feed.
But if you log out .. clear out your cache and cookies .. and just go to the website without logging in it is not in the rss feed.
I was trying to figure out the same thing. Here's what I've got. Download the WP plugin Advanced Category Excluder here:
Created a private category for all posts you don't want in the RSS feed. For me, I created a category called "No Broadcast." In ACE settings you can exclude that category from RSS posts. You'll still need to mark the posts "private" if you don't want them showing up on your main page, so I also use this for posts I don't mind being on the main site, but don't want sent out to every RSS subscriber.
This topic has been closed to new replies.