admin管理员组

文章数量:1200963

Thank you in advanced. I know there are plugins that can do this, but I am looking for a simple solution for my function file. I would like to display the excerpt for all posts with the more tag for public visitors, even for private posts.

Thank you in advanced. I know there are plugins that can do this, but I am looking for a simple solution for my function file. I would like to display the excerpt for all posts with the more tag for public visitors, even for private posts.

Share Improve this question asked Jul 11, 2011 at 2:56 JimmyJackJimmyJack 31 bronze badge
Add a comment  | 

1 Answer 1

Reset to default 0

I've not tested this, but you should be able to complete this task by placing the following code in your template above the loop.

query_posts(
    array(
        'post_status' => array(
            'published',
            'private'
        )
    )
);

This should allow for published and private posts to be displayed in that template.

本文标签: functionsdisplay public excerpt for private post