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
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
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
Hi Barak,
That’s not currently possible unfortunately, but shall be with 1.4.
Stephen Harris