WordPress.org

Support

Support » How-To and Troubleshooting » Make posts accessible via permalink only

Make posts accessible via permalink only

  • I want to make a bunch of posts that I send out to certain people, however, I don’t want anyone else to view them. I don’t want them on the front page, RSS, search, archive, category or any of that. I only want them to become available through a permalink without any passwords or signing in. Stealth Publish does something very close but not exactly because it adds it to the archive and category pages. Any help would be much appreciated.

Viewing 2 replies - 1 through 2 (of 2 total)
  • you can do several things in order to achive that .
    One method would be to create a category for those posts, and just exclude this category from everything, via template tags (for example:

    <?php wp_list_cats('exclude=10,11,12'); ?>

    ) ..
    to exclude feed use :

    http://www.yourdomain.com/wp-rss2.php?cat=-44

    manipulating feed URL in your template again ..

    You coul also create a custom function to ecclude from the query itself via custom queries..

    function exclude_category($query) {
    	if ( $query->is_feed ) {
    		$query->set('cat', '-5');
    	}
    return $query;
    }
    
    add_filter('pre_get_posts', 'exclude_category');

    or even exclude all with:

    if ( $query->is_feed || $query->is_home )

    same for search (never tried, but should work ….)

    Might also check out a plugin option. For example, look at http://wordpress.org/extend/plugins/advanced-category-excluder/

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Make posts accessible via permalink only’ is closed to new replies.
Skip to toolbar