Add projects and display only to clients that are logged in.
|Author:||Rob Scott, LLC (profile at wordpress.org)|
|WordPress version required:||4.3.1|
|WordPress version tested:||4.9.1|
|Added to WordPress repository:||14-10-2015|
|Total downloads:||1 101|
Click to start download
Projects post type functions just like posts. Clients works like tags, except content is restricted to admin and those tagged to a project.
To have your client show up in the tag list, you need to create a user with the custom role of \'Client\'.
You can add a project just like you would a post. It probably uses your themes\' single.php template to display the content.
Single Project being displayed to admin.
Single Project being displayed to logged in user with name matching selected client.
Single Project not being displayed to everyone else.
- Upload and the install plugin.
- Activate the plugin.
- Create a user for your client, select the role client to adds a taxonomy term to the project post type.
- Create a project just like a post. Select the clients you want to display the project for by checking the corresponding taxonomy term that matches the users name.
How can I customize the layout?
The plugin uses the default single.php and taxonomy.php or archive.php to display a single project and a client archive. Add single-ezproject.php to your theme for a single project. Add taxonomy-ezproject_clients.php to your theme for the client archive that shows all projects for a client.
How does this plugin work?
The plugin creates a custom post type called Projects with a taxonomy or Clients. You can add a client as a user, so that they are able to login to the website. When you create the users, they are added to the Clients taxonomy for the projects post type. You create a project just like a post, and select the clients you want to show the project to like you would a tag on a post. A PHP if/else statement checks for the user to be either admin or logged in with a user display name that matches the taxonomy terms selected to display the current project.
- Update to change conditional statement, flush permalinks on activation
- Update rjs_eazy_client_content functions if/else statement to include else block for all content that is not an ezproject post type. This should provide more control for the content filter.
- Initial version of plugin.