• I want to make a user post in their own page only and not on the main blog portion of my site. Does anyone know how to do this? Thanks a lot.

Viewing 7 replies - 1 through 7 (of 7 total)
  • What do you mean by “page”? Pages created in Write > Write Page admin panel? If yes, what you want cannot be done.

    Thread Starter ehjay

    (@ehjay)

    Yeah I think so. I was hoping for a way to create a post and send it to somewhere other than the main page. But oh well.

    Thanks.

    It can be done. Create a category for these specific posts. Exclude this category from your main page (see Codex for the template tags – you can use query_posts and wp_list_cats(‘exclude=X’)) for example to achieve this.
    Next you need a plugin that will allow php to run in your pages. There are several available but Exec-PHP works for me.
    https://www.soeren-weber.net/post/2005/08/18/50/
    Next, create a page which will be home to this category. You’ll need another plugin to list the posts in the category you’ve just created. PostsInCategory will do the job simply or c2c_get_recent_posts if you want to customize more.
    https://chris.narrabilis.com/wp/wordpress/posts-in-category/
    https://www.coffee2code.com/archives/2004/08/27/plugin-customizable-post-listings/
    Put the code to make this plugin work in your page and that should achieve what you are looking for.
    You may need to arrange with the user only to use his specific category or perhaps a plugin for role management can limit him to just that category.

    Thread Starter ehjay

    (@ehjay)

    Wow, that’s really confusing to me. I’ll try to give it a go though. Thanks for your help.

    Well, I can walk you through I guess :
    1) Create the category for the users-only posts, and lets say it’s #4.
    2) Exclude the users-only category from showing its posts on your home page. Backup the index.php or home.php file you’re using. Then, in the index.php or home.php file, find <?php if (have_posts()) : ?> and insert this (it must go before the loop begins) <?php query_posts('cat=1,2,3'); ?> Save. You have to list all the categories that should still show.
    NB. You clould use cat=-4 but you can only excluse one category this way. If you several users-only go for the first solution.
    3) Exclude the user-only category from showing in your sidebar. Backup your sidebar.php (which could be a section of your index.php) and find <?php wp_list_cats(); ?>. Modify it like this <?php wp_list_cats('exclude=4'); ?> Save.
    4) Upload these two files to your theme directory, overwriting the existing ones. Don't forget to backup.
    5) Enable PHP to run in your posts. Download the Exec-PHP plugin and install as indicated in your wp-content/plugins directory. Activate as usual in the WP admin menu.
    6) Retrieve and install the plugin to list the users-only posts and activate it in the WP admin area. I listed the addresses for these plugins above.
    7) Create a page called (say) Users-only. Write your stuff and place your pics. If you chose the PostsInCategory plugin, add this to your post :
    [postsincategory#4]`
    Save and go see your page, you should have a list of the #4 category posts showing.
    If you chose the c2c plugin the code in your post will be a little more complicated but you can customize the look of your list, add author, time, post extracts and so on. The plugin author explains how to do this on his site.
    Thats all. Once again, all this works (I’m using 2.0.3) for me and I hope it will for you but I can’t offer any guarantee.

    Actually, I was just thinking it might be easier to filter the posts to allow only the admin’s to display on index.php. I don’t know of a plugin that would do that. You’d need to edit index.php in the theme.

    Thread Starter ehjay

    (@ehjay)

    This stuff is oh so confusing! lol.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Users writing in their own page only’ is closed to new replies.