Skip to content
Read For Learn
Read For Learn
  • Database
    • Oracle
    • SQL
  • C
  • C++
  • Java
  • Java Script
  • jQuery
  • PHP
Read For Learn
  • Database
    • Oracle
    • SQL
  • C
  • C++
  • Java
  • Java Script
  • jQuery
  • PHP

login

add the user name to menu when user is logged in [closed]

You have an errors in $items.= //Change Password, Logout, etc and $items.= //Sign up, Lost Password you haven`t value for assign.Set something into $items variable or delete this strings and all will work.

Categories menus Tags login, logout, menus, username

Give visitor access to password protected page/post via external script

Finally, I found the solution: form.php <form action=”<?php echo bloginfo(‘template_directory’); ?>/pp-redirect.php” method=”post”> Event: <input name=”event” type=”text” size=”25″ /><br /> Passwort: <input name=”post_password” type=”password” size=”25″ /><br /> <input name=”submit” type=”submit” value=”Los” /> </form> pp-redirect.php <?php /** Make sure that the WordPress bootstrap has run before continuing. */ require( dirname(__FILE__) . ‘./../../../wp-load.php’); global $wp_hasher; if ( empty( … Read more

Categories login Tags login, password, remote-login

How can I make content disappear when a user logs in?

You’ll want to use a PHP if statement in combination with is_user_logged_in If you’re editing your header try this: <?php if (!is_user_logged_in()) { ?> // Your social media icons code goes here <?php } ?> The exclamation point before is_user_logged_in() means ‘is not’ in PHP, so your code essentially says, “If the user is not … Read more

Categories plugins Tags css, javascript, login, php, plugins

Add log in link to menu in Twenty Twelve

Filter wp_nav_menu_objects and add the link as item, similar to this answer. add_filter( ‘wp_nav_menu_objects’, ‘t5_menu_log_link’, 10, 2 ); /** * Add a link to the nav menu. * * @wp-hook wp_nav_menu_objects * @param array $sorted_menu_items Existing nav menu items * @param object $args Nav menu arguments. ‘add_loginout’ must be TRUE * @return array Nav menu … Read more

Categories menus Tags login, menus

How can I test the login for an expired session?

I’ve discovered the following stuff. This kind of login is called internally Interim. It works thanks to the continuous polling offered by the Heartbeat API. The prefix of the expired session functionality is wp-auth-check and the important bit for me was a little script at /wp-includes/js/wp-auth-check.js. When the auth check request is sent to the … Read more

Categories login Tags login, session

Display sortable User meta column in admin panel user’s page

I replaced //make the new column sortable function user_sortable_columns( $columns ) { $columns[‘login_level’] = ‘login_level’; return $columns; } add_filter( ‘manage_users_sortable_columns’, ‘user_sortable_columns’ ); //set instructions on how to sort the new column function my_user_query($userquery){ if(‘login_level’ == $userquery->query_vars[‘orderby’]) { global $wpdb; $userquery->query_from .= ” LEFT OUTER JOIN $wpdb->usermeta AS alias ON ($wpdb->users.ID = alias.user_id) “;//note use of … Read more

Categories wp-admin Tags account, login, user-meta, users, wp-admin

How can I do customizations on login, registration and password recovery forms?

For an general overview about hooks take a look at the codex page about the Plugin API: This article is specifically about the API of “Hooks”, also known as “Filters” and “Actions” Besides that there is valuable information specifically about customizing the login and registration form available at the codex: Customizing the Login Form You … Read more

Categories hooks Tags codex, hooks, login, user-registration, wp-login-form

Which hook should be used to validate custom form fields on the login form?

Use the action ‘login_init’ to catch all calls to wp-login.php. Sample code: add_action( ‘login_init’, ‘wpse_51227_validate_custom_field’ ); function wpse_51227_validate_custom_field() { if ( ! isset ( $_POST[‘special_custom’] ) return; if ( ! is_numeric( $_POST[‘special_custom’] ) // handle the error } There are two important global variables available: $errors is an instance of WP_Error. Maybe you want to … Read more

Categories plugins Tags hooks, login, plugins

redirect wp-login.php to another page

If you’re only concerned about login links displayed on your pages, you should be able to modify the URL by hooking the login_url filter. This won’t redirect a user that types http://MYSITE/wp-login.php directly into their browser, but it should affect the login links displayed throughout your site. This is the example code from the login_url … Read more

Categories functions Tags functions, login, redirect, template-redirect

How to Block Access to Standard Login Flow and Comment Flow

All standard login / registration action are done using ‘wp-login.php’ file. The standard comments are saved using ‘wp-comments-post.php’ file. Blocking this 2 files you block standard flow for comments, login, registration and password recover. Very early in its bootstrap WordPress save a global variable $pagenow that contain the name of the file being loaded. You … Read more

Categories comments Tags .htaccess, comments, login, security, signup
Older posts
Newer posts
← Previous Page1 … Page145 Page146 Page147 … Page164 Next →
+ More

Recommended Hostings

Cloudways: Realize Your Website's Potential With Flexible & Affordable Hosting. 24/7/365 Support, Managed Security, Automated Backups, and 24/7 Real-time Monitoring.

FastComet: Fast SSD Hosting, Free Migration, Hack-Free Security, 24/7 Super Fast Support, 45 Day Money Back Guarantee.

Recent Added Topics

  • Bug in translation system: load_theme_textdomain() returns true, files are available and accessible but the language defaults to english
  • Post Navigation Elementor
  • Custom Elementor controls not appearing in the widget Advanced tab using injection hooks
  • WPFacet multiple loop displaying duplicate content
  • Get the name of the template/*html file used
  • Fix: WordPress.DB.PreparedSQL.NotPrepared Plugin Check (PCP)
  • Removing unnecessary CSS and JS code from wp_head()
  • hexagonal image gallery. Am I on the right track? [closed]
  • Trying to Add Paging to Single Post Page
  • Sharing media files between live and staging servers
© 2026 Read For Learn
Next Page »
  • Database
    • Oracle
    • SQL
  • algorithm
  • asp.net
  • assembly
  • binary
  • c#
  • Git
  • hex
  • HTML
  • iOS
  • language angnostic
  • math
  • matlab
  • Tips & Trick
  • Tools
  • windows
  • C
  • C++
  • Java
  • javascript
  • Python
  • R
  • Java Script
  • jQuery
  • PHP
  • WordPress