meta key of email

This topic contains 19 reply and 2 voices, and was last updated by Sekander Badsha 9 years, 7 months ago
Viewing 15 Posts - 1 through 15 (of 19 total)
Author Posts
July 15, 2014 at 8:31 pm 23621
Sekander Badsha Hi How can i use email of the custumer fields? what is the meta key and can i use it?
July 17, 2014 at 12:07 pm 23690
Sekander Badsha Sekander Badsha

Hello Ba Seckou,
Can you please explain what are you trying to do ?

July 17, 2014 at 11:01 pm 23731
Ba Seckou Ba Seckou

Hi

It’s working now thunks. But I have one problem now:
In my site i have 3 roles and they 3 forms register; and only 1 can mike post. To do that, in the 2 forms page i add this :

[wpuf_profile type=”registration” id=”xxxx” wpuf_can_post=”no” wpuf_addpost_notice=”Msg “]

it’s not working because the 2 roles can mike post.

Haw can i do that’s to be working.

Please help!

July 20, 2014 at 9:10 pm 23816
Sekander Badsha Sekander Badsha

You can decide the user roles in the registration forms. Even you can use different registration forms for different user roles. But you can’t control the post forms.
If you want to restrict different users to use different posting forms, then you may use the current_user_can functions on your pages. Here is the official WordPress documentation http://codex.wordpress.org/Function_Reference/current_user_can

July 21, 2014 at 6:20 pm 23876
Ba Seckou Ba Seckou This reply has been marked as private.
July 21, 2014 at 9:01 pm 23888
Sekander Badsha Sekander Badsha

Not functions.php, in the page that contains your form. As an example you have a form to post videos and that form is inside a page named “Post Video”. So you’ll have to paste the code in the “Post Video” page. Because that code, only the “Post Video” page will be inaccessible to some user roles.

July 21, 2014 at 9:07 pm 23890
Ba Seckou Ba Seckou This reply has been marked as private.
July 22, 2014 at 12:11 pm 23932
Sekander Badsha Sekander Badsha

Here I have modified a page template for a role “subscriber”. I’m using the full width template of twenty twelve for a form. And The template will check for the user role and control the access to the pages that are using this template.
[php]
<?php
/**
* Template Name: Full-width Page Template, No Sidebar
*
* Description: Twenty Twelve loves the no-sidebar look as much as
* you do. Use this page template to remove the sidebar from any page.
*
* Tip: to remove the sidebar from all posts and pages simply remove
* any active widgets from the Main Sidebar area, and the sidebar will
* disappear everywhere.
*
* @package WordPress
* @subpackage Twenty_Twelve
* @since Twenty Twelve 1.0
*/

get_header();

if (!current_user_can( ‘subscriber’ ) ) {
echo ‘you are not subscriber’;
}else {
echo ‘You are subscriber’;
?>

<div id="primary" class="site-content">
<div id="content" role="main">

<?php while ( have_posts() ) : the_post(); ?>
<?php get_template_part( ‘content’, ‘page’ ); ?>
<?php comments_template( ”, true ); ?>
<?php endwhile; // end of the loop. ?>

</div><!– #content –>
</div><!– #primary –>

<?php }
get_footer(); ?>
[/php]

You can use any user role instead of “subscriber”. But make sure you make a new template to use for the forms to restrict access.

July 22, 2014 at 1:20 pm 23938
Ba Seckou Ba Seckou This reply has been marked as private.
July 24, 2014 at 2:39 pm 24060
Sekander Badsha Sekander Badsha

You’re quite near! But the template should be in your theme folder.
If you’re not familiar with customizing theme or plugins, it’d be better to hire a developer. If you’re new to customizing WordPress themes or plugins you may scramble things up.

July 24, 2014 at 7:34 pm 24084
Ba Seckou Ba Seckou This reply has been marked as private.
August 5, 2014 at 3:00 pm 24566
Sekander Badsha Sekander Badsha

Yes. If you’re using a theme named “Detube”, then yes.
You have to make a new template and use that template on your pages where you want to control the access. To ease the identifying process you may Give identical names to the templates.

August 7, 2014 at 12:55 am 24687
Ba Seckou Ba Seckou This reply has been marked as private.
August 11, 2014 at 1:01 pm 24905
Sekander Badsha Sekander Badsha

When You create a page from wp-admin, you’ll see a field on the right side to select template. Select this tempate from there and save. You should place the shortcode inside the page you just made from wp-admin.

August 11, 2014 at 4:40 pm 24932
Ba Seckou Ba Seckou This reply has been marked as private.
August 16, 2014 at 6:59 pm 25279
Sekander Badsha Sekander Badsha

If you’re not familiar with codes, please hire a developer.

Viewing 15 Posts - 1 through 15 (of 19 total)