WordPress.org

Ready to get started?Download WordPress

Forums

Restrict Authors to One Page? (3 posts)

  1. cpcuk
    Member
    Posted 3 years ago #

    Good morning all

    I am looking to allocate a login account and a single page to some of our users so that they can update their individual page and release posts on the site. I am wanting to limit their editable and publishing allowances to just their individual page and wondered if there was a way I might be able to do that.

    Any help would be much appreciated!

  2. rebelit
    Member
    Posted 3 years ago #

    You could try the User Role Editor plugin and create a custom role.

    Getting a new custom permission set correct can be hard work though. But one of the permission checkboxes is "Edit Others Pages"

    If you can get a custom permission set that works then you should be able to do it from there.

    Presumably though you'll need to ensure that each users page's only show their own posts?

    Possibly something like this...
    1) Create page template type which (in a childtheme) called for example user_page.php with this as the content

    <?php
    	/*
    	Template Name: user_page
    	*/
    	include TEMPLATEPATH . "/index.php";
    ?>

    You can then create the pages for the users and set to this template type. You can then use the is_page_template() function as a test in your query code.

    2) This bit will depend on your theme. I use thematic childthemes so would filter the page query in my functions.php. Something like this...

    <?php
    function Langdale_Queries() {
    	$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
    	if (is_page_template('user_page.php')) 	{
    		query_posts("[your code here] &paged=$paged");
    	}
    }
    add_action('thematic_abovecontainer', 'Langdale_Queries');
    ?>

    You'd need to map the page name to the appropriate user & then check the codex for appropriate parameters to get only the posts for a given user

  3. carlharris
    Member
    Posted 2 years ago #

    Hi rebelit
    I am following your tips above to achieve the same result as cpcuk. Can you explain what you mean at the end by: 'check the codex for appropriate parameters'?

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.