Support

Home Forums Event Espresso Premium Hide address in events list, but not on single event page.

Hide address in events list, but not on single event page.

Posted: July 20, 2013 at 6:38 pm

Viewing 4 reply threads


Jennifer Benn

July 20, 2013 at 6:38 pm

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.

http://worldofvirtues.com/all-workshops/

Regards
Jenny

.a_register_link {display:none;}


Tony Warwick

July 21, 2013 at 6:12 am

Hi Jennifer,

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.


Jennifer Benn

July 21, 2013 at 7:03 pm

Thanks, I did that. However now there is a blank line above the address. how can I remove it?

http://worldofvirtues.com/test/


Tony Warwick

July 22, 2013 at 2:22 am

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:

<pre class=”brush: css; gutter: true; first-line: 1; highlight: []; html-script: false”>.event_address br:first-child {
display: none;
}

That removes the BR that goes with the section-title that you have hidden. There is another at the beginning of the address block. Same again:

<pre class=”brush: css; gutter: true; first-line: 1; highlight: []; html-script: false”>.address-block br:first-child {
display: none;
}

Hope that helps.


Tony Warwick

July 22, 2013 at 2:25 am

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.

Event Espresso