Hi. I would like to hide the address in the events list, but not on the single event. I’ve added code to hide the address but it’s hidden it in both places. How can I enable it on just the single events, but not on the list?
Both are displayed on this page for the purpose of testing.
I noticed in your other thread there are other changes you are making, so depending on what other changes you want, this may not work.
Rather than calling the information, then hiding it, you can just turn it off to begin with.
Are you using the Venue manager? If not I would consider it.
If you go to Event Espresso -> Template Settings.
Set ‘Display addresses in the event listings?’ to NO.
Set ‘Display the address in the registration form?’ to YES.
This will remove the the venue info from EVENT_LIST but include the address within all single event registration forms.
The shortcode on the test page does not load an event.
I looked on the original workshops link to compare so should be the same.
The blank lines are caused by extra BR html tags.
These are hard coded into the address info, they are there to give formatting to the address info when all fields are used. Unfortunately that is not what you want.
There are two ways you can remove the spacing.
Either edit the template files to remove the unwanted BR tags or add some extra css to remove the spacing.
Staying with CSS, you can’t just select all BR tags as they are used everywhere and have a purpose. I would use:
Can’t edit my post and code was messed up. Ignore the pre tags.
.event_address br:first-child {
display: none;
}
.address-block br:first-child {
display: none;
}
Viewing 4 reply threads
The support post ‘Hide address in events list, but not on single event page.’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.
Support forum for Event Espresso 3 and Event Espresso 4.