Make posts accessible via permalink only (3 posts)

  1. the4starish
    Posted 6 years ago #

    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.

  2. krembo99
    Posted 6 years ago #

    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 :


    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 ....)

  3. Chris_K
    Posted 6 years ago #

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

Topic Closed

This topic has been closed to new replies.

About this Topic