WordPress Redirect / Add_Rewrite_Rule – Non Index.php Page

If company is the page slug try ‘index.php?pagename=company&code=$matches[1]’ If you want it in .htaccess to intercept it before it goes to index.php try ‘index.php?pagename=company&code=$1’ If company is a folder, there should be an index.php (or whatever the default file name is for your server) inside it that will process code.

Echo Option Value Based On WordPress User Role

Something like this? if(current_user_can(‘administrator’)){ echo ‘<option value=”[email protected]”>[email protected]</option>’; }elseif(current_user_can(‘subscriber’)){ echo ‘<option value=”[email protected]”>[email protected]</option>’; } Maybe this should be wrapped in a user logged in check like this: if(is_user_logged_in()){ if(current_user_can(‘administrator’)){ echo ‘<option value=”[email protected]”>[email protected]</option>’; }elseif(current_user_can(‘subscriber’)){ echo ‘<option value=”[email protected]”>[email protected]</option>’; } }

Can i add custom code in Source in specific page, Header from function.php?

You can add conditions in you function if you want to add icons like this method you mentioned in question. function hook_link() { global $post; if ($post->post_type == ‘page’ && $post->ID == ‘whatever page id’) { echo ‘<link href=”http://buhehe.de/wp-content/uploads/2017/12/Buhehe.ico” rel=”shortcut icon” type=”image/x-icon”>’; } ?> <?php } add_action(‘wp_head’, ‘hook_link’); to check page or post etc you … Read more

Inserting other fields to existing registration form in a WordPress theme

I figured out the fix on my own, after many try and errors. I just change this line of code: $status = wp_create_user( $username, $password, $email ); to this: $status = wp_insert_user( array (‘first_name’ => $first, ‘last_name’ => $last, ‘user_pass’ => $password, ‘user_login’ => $username, ‘user_email’ => $email, ‘phone’ => $user_phone, ‘role’ => ‘subscriber’ ) … Read more