Check if Page=current user page via shortcode

I don’t know how you are assigning a page to the user, however you can develop a short-code as following: <?php function myFunction() { if({condition check}) { /*do ur stuff */ } else { /*do ur stuff */ } } add_shortcode(‘your_shortocde_string’, ‘myFunction’); ?> Define the function in functions.php You can call by using shortcode [your_shortcode_string] … Read more

Adding users to another blog

You said you wanna register any user to other blogs when a user is created. But this get_current_user_id() doesn’t fire on user creation. You better have a look on wp-includes/user.php at line 1401 the wp_insert_user function. WordPress default registering process uses this function to insert new users. And if you wanna create the user manually … Read more

Custom User Notice Upon Login

You could add code via the wp_login() hook; see how it works here: https://codex.wordpress.org/Plugin_API/Action_Reference/wp_login . The hook would be placed in your Child Theme’s function.php file (always use a Child Theme; you never want to modify theme code, as your code changes will be overwritten on a theme update).

Show a list of user posts in the user admin page

You can use edit_user_profile (when viewing other user profiles) and show_user_profile (when viewing your own profile) actions to add information on profile page. So to have there the list of posts of the selected user you could add to your functions.php: function show_user_posts_on_profile( $user ) { $args = array( ‘author’ => $user->ID ); $user_posts = … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)