Registration form not registering First and Last name

You’re not handling the names the same way as the other fields: //// VERIFIES CREDENTIALS $username = isset($_POST[‘username’]) ? trim($_POST[‘username’]) : ”; $first_name = isset($fields[‘user_first_name’]) ? sanitize_text_field(trim($fields[‘user_first_name’])) : ”; $last_name = isset($fields[‘user_last_name’]) ? sanitize_text_field(trim($fields[‘user_last_name’])) : ”; $email = isset($_POST[’email’]) ? trim($_POST[’email’]) : ”; Notice how you use $_POST[’email’] and $_POST[‘username’], but then you use $fields[‘user_last_name’], … Read more

WordPress rating by views [closed]

First of all you have to start log views of each post. You can do it by yourself or by a plugin. Here you have an example how you can track this number without any plugin. Add this code to the theme’s functions.php file function prefix_get_post_views( $post_id ){ $count_key = ‘post_views_count’; $count = get_post_meta( $post_id, … Read more

WordPress styling recent post

You can just list them as a list regularly, and style them with css li:nth-child(even) { background: #000 } li:nth-child(odd) { background: #CCC } If you are worried about browser support you could add different classes when you’re populating the list in PHP using $i or something like for($i = 0; $i < count($list); $i++) … Read more