Home Forums Plugin Support WP User Frontend Pro meta key of email

This topic is: resolved

This topic contains 19 replies, has 2 voices, and was last updated by  Sekander Badsha 4 years, 9 months ago.

Viewing 15 posts - 1 through 15 (of 20 total)
  • Author
    Posts
  • #23621

    Ba Seckou
    Member
    Post count: 26

    Hi

    How can i use email of the custumer fields? what is the meta key and can i use it?

    #23690

    Sekander Badsha
    Member
    Post count: 2067

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

    #23731

    Ba Seckou
    Member
    Post count: 26

    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!

    #23816

    Sekander Badsha
    Member
    Post count: 2067

    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

    #23876

    Ba Seckou
    Member
    Post count: 26
    This reply has been marked as private.
    #23888

    Sekander Badsha
    Member
    Post count: 2067

    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.

    #23890

    Ba Seckou
    Member
    Post count: 26
    This reply has been marked as private.
    #23932

    Sekander Badsha
    Member
    Post count: 2067

    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.

    #23938

    Ba Seckou
    Member
    Post count: 26
    This reply has been marked as private.
    #24060

    Sekander Badsha
    Member
    Post count: 2067

    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.

    #24084

    Ba Seckou
    Member
    Post count: 26
    This reply has been marked as private.
    #24566

    Sekander Badsha
    Member
    Post count: 2067

    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.

    #24687

    Ba Seckou
    Member
    Post count: 26
    This reply has been marked as private.
    #24905

    Sekander Badsha
    Member
    Post count: 2067

    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.

    #24932

    Ba Seckou
    Member
    Post count: 26
    This reply has been marked as private.
Viewing 15 posts - 1 through 15 (of 20 total)

The topic ‘meta key of email’ is closed to new replies.