how to show logged in members username in wordpress content

It looks like $current_user->user_firstname contains some tag content. I would replace that line with: <h5>Hi <?php echo esc_html($current_user->user_firstname); ?></h5> or <h5>Hi <?php echo strip_tags($current_user->user_firstname); ?></h5> One of those (or either) may solve your problem outright.

Parse error: syntax error, unexpected ‘}’ in C:\wamp64\www\Proiect\aplicatie\user_check.php on line 18 [closed]

The semi-colons need to go inside the curly braces, to mark the ends of the array_push() statements: if(empty($username)) { array_push($errors, “Username is required”); } if(empty($email)) { array_push($errors, “Email is required”); } if(empty($password)) { array_push($errors, “Password is required”); } You don’t need semi-colons after the close braces.

How-To: Get meta data from the users last order in woocommerce

First thing is to grab the last order ID, you can do it with a simple WP_Query $args = array(‘post_type’=>’product’, ‘posts_per_page’=>1, ‘orderby’=>’ID’, ‘orderby’=>’DESC’); $query= WP_Query($args); As this will only give only one result, you don’t need to loop the result, $order_id= $query->posts[0]->ID; Now, you can reach the order data, $order = WC_Order($order_id); You can use … Read more

Limit user access to installing/configuring a plugin?

WP doesn’t have a built-in way to restrict permissions this granularly. You can either install plugins, or not. For settings, it depends on where the plugin surfaces its settings. For example, if the settings are under the “Settings” menu, then by default only users with role “administrator” will be able to access and adjust them. … Read more

Anyone Can Register

It simply allows the general public to create a new WordPress user. Whether or not they can see other user’s user information depends on the default role assigned to new users and any capabilities assigned. Unless you change the default role setting, new users will be assigned the Subscriber role which only has the read … Read more