How to pass REQUEST_URI to function
How to pass REQUEST_URI to function
How to pass REQUEST_URI to function
In functions.php write this code function my_optionally_widgets() { $option = get_options(‘wantwidget’); if($option == ‘yes’) { register_widget(‘mywidget’); /* add other widgets for registration here */ } } add_action(‘widgets_init’, ‘my_optionally_widgets’); function my_optionally_sidebars() { $option = get_options(‘wantsidebar’); if($option == ‘yes’) { register_sidebar($args); /* add other sidebars for registration here */ } } add_action(‘init’, ‘my_optionally_sidebars’); Remember that Widget Areas … Read more
Find <div id=tab2_login” and replace it with following code.Assuming you will change CSS and JS accordingly. <div id=”tab2_login” class=”tab_content_login” style=”display:none;”> <h3>Register for this site!</h3> <p>Sign up now for the good stuff.</p> <form method=”post” action=”<?php echo site_url(‘wp-login.php?action=register’, ‘login_post’) ?>” class=”wp-user-form”> <div class=”username”> <label for=”user_login”><?php _e(‘Username’); ?>: </label> <input type=”text” name=”user_login” value=”<?php echo esc_attr(stripslashes($user_login)); ?>” size=”20″ id=”user_login” … Read more
you could try some thing like this. add_action( ‘register_form’, ‘my_register_form’ ); function my_register_form() { ?> <select> <option>Role_1</option> <option>Role_2</option> <option>Role_3</option> </select> <?php }
In the admin dashboard, you are able to add a new user with the email address as the user name (thus requiring them to sign in using their email address). Furthermore, when users register for an account (if you have this feature enabled in your site), they can provide their email address as their username. … Read more
Mail function not working with user accounts
Create custom fields/meta data gender+country – radiobuttons and dropdown on register screen for these fields
You will need to give user2 Super Admin privileges by directly modifying the database. Run this query in phpMyAdmin: SELECT * FROM wp_sitemeta where meta_key=’site_admins’; This is an array of all your Super Admins. It should return something like this: a:1:{i:0;s:5:”user1″;} Note that 5 is the length of string ‘user1’. Here is an example modification … Read more
The user table column you are searching for is user_email $emails = new WP_User_Query( array( ‘fields’ => array( ‘display_name’, ‘user_email’, ), // you don’t want everything, right? ‘orderby’ => ’email’, // ‘user_email’ works as well ‘order’ => ‘ASC’, // default: ‘DESC’ ‘number’ => 10, // total amount of users to return ‘offset’ => 0, // … Read more
How to create a dedicated folder for specific role via registration