You are logged in as admin@wpnew.com. Not you?

WordPress Event Management, Calendars & Registration Forums General Question You are logged in as admin@wpnew.com. Not you?

This topic contains 3 replies, has 2 voices, and was last updated by  Stephen Harris 10 years, 8 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #7044

    On Event details page ( for single event) under bookings heading (just after the event text) there is a line that says:

    You are logged in as admin@wpnew.com. Not you?

    If you hit not you..it logs you out of wordpress (if you are logged in) and show 2 forms side by side (one with option to create an account and other to login to wordpress)

    Is there a way to get rid of that line (You are logged in as admin@wpnew.com. Not you?) under bookings subhead in event details page? If yes, how?

    Please adivce.

    barak kassar
    #7046

    Hi Barak,

    This will be much easier in 1.4 which will hopefully be hitting beta over the weekend. There are two ways to hide this, the first is to hide the notice with CSS, in your the theme’s style.css

    .eo-booking-notice-logged-in{ display: none }
    

    But that just hides, rather than removes it, to remove it add the following to your functions.php:

    add_filter( 'eventorganiser_booking_form_notices', 'my_remove_are_you_logged_in' );
    function my_remove_are_you_logged_in ( $notices ){
    
        $dom = new DOMDocument;
        $dom->loadHTML( $notices );
    
        $xpath = new DOMXPath( $dom );
        $pDivs = $xpath->query("//*[contains(@class, 'eo-booking-notice-logged-in')]"); //->query(".//div[@class='']");
    
        foreach ( $pDivs as $div ) {
            $div->parentNode->removeChild( $div );
        }
    
        return preg_replace( "/.*<body>(.*)<\/body>.*/s", "$1", $dom->saveHTML() );
    }
    

    In 1.4 you’ll be able to edit the templates to remove this template, and that’s a much easier and nicer approach.

    Stephen Harris
    #7049

    Thanks Stephen,

    That did help me when some one is logged in to the wordpress where I have installed this even organiser…but when there is a new user /or a user which is not logged in we do not want to show him the login form! One can just fill in the name email and can book.

    Where is the function for that. Please advice.

    barak kassar
    #7050

    Hi Barak,

    That’s not currently possible unfortunately, but shall be with 1.4.

    Stephen Harris
Viewing 4 posts - 1 through 4 (of 4 total)
To enable me to focus on Pro customers, only users who have a valid license for the Pro add-on may post new topics or replies in this forum. If you have a valid license, please log-in or register an account using the e-mail address you purchased the license with. If you don't you can purchase one here. Or there's always the WordPress repository forum.