Support

Home Forums Event Espresso Premium Address field to hide

Address field to hide

Posted: December 3, 2013 at 8:11 am


B D

December 3, 2013 at 8:11 am

My events are listed in a category type blog page; the events show as a WP normal post. (I prefer this solution to the default EE posts).

In my events’ list and the event WP posts, for some reason the Address field shows up above the event description. I need to hide this field from the event’s WP post (and events’ list). I suppoose there is some simple css to tweak. (On the other hand, in the native EE registration page, everything is ok, so I suppose it is the interaction between EE and my theme that causes this).

Thank you in advance for your help.


Josh

  • Support Staff

December 3, 2013 at 2:31 pm

It may be possible to hide the address with some CSS, or you can go in and edit the event_post.php template that’s included with Event Espresso (it’s in the /templates folder). Near the bottom of the template (line 238) you’ll find:

<p><?php echo $location ?></p>

which can be removed.

After you make this change, you’ll need to update the event so the changes will take affect.


B D

December 3, 2013 at 2:55 pm

Thank you Josh.

Strangely enough, I don’t have that line in event_post.php.

Would you have a suggestion for css?


Dean

December 4, 2013 at 3:49 am

Hi,

There actually isn’t any CSS that can be used here, but you could move or remove the following PHP from the event_post.php file:

<p><?php echo $event_address ?></p>


B D

December 4, 2013 at 5:22 am

I have removed the indicated php line in event_post.php, but nothing changed.

The “Address” line (and only this line, not Address2 etc.) keeps showing above the description, and this only in the WP usual posts (my events are actually WP posts) and the blog page listing my events, but not in the native registration EE page.


Tony

  • Support Staff

December 4, 2013 at 5:44 am

Hi B D,

Just to confirm, if you have event_post.php within uploads/espresso/templates then it is this file that needs to be edited. Line 275.

Also your running W3 Total Cache which I’m ussing is also caching your WP Posts. Could you try purging the cache (disabling the plugin does not delete the cache) and check if the address is still visible please.

  • This reply was modified 10 years, 4 months ago by  Tony. Reason: Wrong line number


B D

December 4, 2013 at 5:57 am

Hi Tony,

I have indeed removed the above metioned line 275 in the uploads file and purged the cache. The address line is still there, above the description.
(The date line is also there, above the description, but this is ok for me. It is the address line that I want to remove in that place).


Josh

  • Support Staff

December 4, 2013 at 8:19 am

Did you update the event in the event editor after making the change to the template? The event post will need to be re-generated before the changes will take effect.


B D

December 4, 2013 at 8:48 am

Yes, I updated and nothing changed.

What is more troubling is that by removing the above php line in event_post.php has resulted in the disparition of the event’s description altogether on the events’ list page! So I had to put back that line in order to have back the description on the events’ page.

(Of course, if needed I give you access to my site’s admin area).


Josh

  • Support Staff

December 4, 2013 at 9:47 am

Hi BD,

While we try to help as best we can to make little customizations like this one possible, we are really not in a position to gain admin access to customers’ site for the purposes of customizations without the purchase of priority support.

If you can post a copy of the event_post.php template in a pastebin (at pastebin.com, or even a github gist) we can take a look and make some further suggestions.


B D

December 4, 2013 at 9:58 am

Thank you Josh.

I certainly do not expect a customization, but to correct a flaw. By any standard, having the name of the street (the field “Address”) showing up above the event’s description both in the list and the event’s post is a problem that must be solved.

I pasted the event_post.php at http://pastebin.com/05DfmVMf

Thank you again for your kind help.


Josh

  • Support Staff

December 4, 2013 at 12:27 pm

You can remove what’s there on line 275 and even 276 to remove the address information. The latter part of line 276 has a registration link, so you could leave that part.


B D

December 4, 2013 at 1:52 pm

Hi Josh,

As I said above in my email (addressed to Tony), I have removed the line 275, purged the cache and updated the event, but not only this has not removed the address line above the description, but the result was that the event’s description has disappeared altogether! So I had to put back the line 275 in order to have back the description.


Tony

  • Support Staff

December 5, 2013 at 3:07 am

Hi,

I logged into the site for your other tread regarding translation, I couldn’t find any Posts.

Can you link me to the page/posts in question please? If you would prefer you can email them to support at eventespresso.com just put a reference to this thread within the body of the email please.


B D

December 5, 2013 at 4:41 am

Hi Tony,

When you log into my site’a admin, please go on the site itself and in the top menu go to “Actualites/Evenements”. There is the list of my EE events as WP posts in a blog page. You can see that above the events’ description shows up the name of the street, that is, the field “Address” (the date too, but the date can remain; the problem is to remove the street’s name above the description).

If you click on any of the events of that list, the field “Address” shows up above the description in the posts as well. (It is only in the native EE registration page that it does not show up above the description).


Tony

  • Support Staff

December 5, 2013 at 8:54 am

Looking into this now.


Tony

  • Support Staff

December 5, 2013 at 9:03 am

Rather than removing the line, commenting out the echo works, so the line becomes:

<p><?php //echo  $event_address ?></p>


B D

December 5, 2013 at 10:16 am

Thank you.

I commented as indicated (my line 275 is now: <p><?php //echo $event_address ?></p>) but nothing changed; the address line is still above the description.


Josh

  • Support Staff

December 5, 2013 at 11:30 am

Did you update the event? You may also need to comment out or remove the following line so that the remainder of the address information doesn’t display.


B D

December 5, 2013 at 12:06 pm

Thank you so much Josh.

After updating the event, the address line above the description has indeed disappeared.

Problem solved now.

The support post ‘Address field to hide’ 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