So I have a dropdown menu which contains a login form. This comes from aWP plugin so I can't edit the code directly. Now once I enable said plugin it always shows on the website. I only want it to show if is_user_logged_in
is false. The solution I came up with would be to use an if statement to check if the user is logged in or not and to show some text or the login form depending on the situation. Now this idea didn't work since the login form will always show. My question therefor would be if its possible to add some css to a class when I don't have access to the HTML? The code I came up with so far is noted below.
<?php
if ( is_user_logged_in() ) {
/* The logout function */
} else {
/* The code that SHOULD change the CSS. */
}
?>
Now obviously I removed the logout function since it's not needed here and it makes the code look cleaner.
PS. The class we need to change would be .lorem and the styling would be display: block/none;