I want to create a custom post that will upload files to a particular user account, so when he will sign in he can check his files list in an assigned page. Different user has various files uploaded by admin and its private to them. I have advanced custom filed pro plugins.
Ok My code in function.php file
function codex_custom_init() {
$args = array(
'public' => true,
'label' => 'UserFileManager',
'has_archive' => true,
'show_ui' => true,
'capability_type' => 'page',
'hierarchical' => true,
'page_template' => 'single-writer.php',
'supports' => array('title', 'editor', 'excerpt', 'thumbnail', 'revisions', 'page-attributes')
);
register_post_type('userfilemanager', $args );
}
add_action( 'init', 'codex_custom_init' );
I have created a rule through which it will get assign to 'userfilemanager'.
'location' => array (
array (
array (
'param' => 'post_type',
'operator' => '==',
'value' => 'userfilemanager',
),
),
I want to know through which location setting it would assigned files to a particular users?
Am i going correct or is there any other solutions?
Thanks!
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire