Tips and Tricks HQ Support

Support site for Tips and Tricks HQ premium products

  • Home
  • Contact Us
  • Documentation
  • Forum Home
    • Forum
    • Forum Search
    • Forum Login
    • Forum Registration

Compact login widget – Add class when you are logged

by

Tips and Tricks HQ Support Portal › Forums › WP eMember › Compact login widget – Add class when you are logged

Tagged: login widget, member login

  • This topic has 2 replies, 2 voices, and was last updated 10 years, 8 months ago by jaune8.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • August 25, 2014 at 9:40 am #11371
    jaune8
    Member

    Hi,

    I just want to change the CSS of the compact login form when i am login and when i’m not.

    It is possible to add a class or ID to the compact login form to easily style it if logged or not ?

    I have put this to my header.php

    <div class=”bloc-login”>

    <?php echo eMember_compact_login_widget(); ?>

    </div>

    Thanks for help :)

    August 26, 2014 at 12:36 am #65151
    admin
    Keymaster

    You can do that by using the functions explained in the following documentation:

    https://www.tipsandtricks-hq.com/wordpress-membership/wp-emember-miscellaneous-tweaks-248

    Let me know if that helps.

    August 26, 2014 at 10:12 am #65152
    jaune8
    Member

    Yeah thanks for all ! it works

    It was for the Login popup, to overwrite one z-index property.

    I put this in the header.php and it works :)

    <style>

    .eMember_compact_login{

    <?php

    $emember_auth = Emember_Auth::getInstance();

    //User is logged in so add your conditional code here

    $membership_level = $emember_auth->getUserInfo(‘membership_level’);

    if($membership_level == 0)

    {

    echo ‘z-index: inherit;’;

    }

    ?>

    }

    </style>

    Thanks for all, have a good day or night ;)

  • Author
    Posts
Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.
Log In

Forum Related

  • Forum Home
  • Forum Search
  • Forum Registration
  • Forum Login

Support Related Forms

  • Contact Us
  • Customer Support
  • Request a Plugin Update
  • Request Fresh Download Links

Useful Links

  • Plugin Upgrade Instructions
  • WP eStore Documentation
  • WP eMember Documentation
  • WP Affiliate Platform Documentation
  • Tips and Tricks HQ Home Page
  • Our Projects

Quick Setup Video Tutorials

  • WP eStore Video Tutorial
  • WP eMember Video Tutorial
  • WP Affiliate Platform Video Tutorial
  • Lightbox Ultimate Video Tutorial

Our Other Plugins

  • WP Express Checkout
  • Stripe Payments Plugin
  • Simple Shopping Cart Plugin
  • Simple Download Monitor

Copyright © 2025 | Tips and Tricks HQ