Limit the number of successful logins
Limit the number of successful logins
Limit the number of successful logins
As per GentlemanMax’s comment, you’ll want a table. There’s a really useful guide in the Codex (which also goes into how to do DB upgrades / migrations.) One thing I’d emphasise: make sure to use $wpdb->prefix in the table name because not all sites will have tables beginning wp_*. Also, if you’re ever planning to … Read more
site_url() returns with additional backslashes
Copy the file to your child theme, In your child theme, create a template and name it what ever you want, e.g content-child.php Now you can replace lib/login/register.php with your new template: <?php get_template_part( ‘content-child’, get_post_format() ); ?> It should work.
Ok, As it’s front-end… I might: Set up the folder on the server so that WordPress can read/write (775 or 755 ordinarily works depending on how your server is configured in terms of user/group permissions). Allow a user on the front end to see the files or choose which file to delete Upon choosing the … Read more
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
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
You’ve got some serious syntax errors – once you open that <?php tag, you’re running PHP – no need to execute it again (i.e. inside your variable assignment strings): if ( is_user_logged_in() ) { // Only show the output below if a user is logged in $admin_link = esc_url( admin_url() ); // Escaped admin link … Read more
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
Try using the post variable to access the post_title global $post; $s = $post->post_title; echo substr($s, 0, strrpos($s, ‘on’) – 1);