Support

Home Forums Event Espresso Premium Events List Styling / PHP

Events List Styling / PHP

Posted: July 26, 2012 at 12:53 pm


tpretzloff

July 26, 2012 at 12:53 pm

On page, http://www.bluelinedefense.com/permit-to-carry I have a listing of upcomming events at the bottom of the page. Where is the php file and what is it’s title that Displays the Date, Start Time, Price, and Available spaces? I want to take out the code that displays the price.


Josh

  • Support Staff

July 26, 2012 at 1:06 pm

I would recommend hiding this with CSS. Add this to the custom stylesheet of the WP theme or use the my custom CSS plugin

.upcomingCourses p.event_price {display:none;}


tpretzloff

July 26, 2012 at 1:11 pm

I would also like to add the end time of the event as well and maybe the location… can I do that with CSS? or does that have to be done with PHP?


Josh

  • Support Staff

July 26, 2012 at 1:32 pm

No, it would have to be done with PHP. The file that outputs the markup for the upcoming events widget is widget.php. You should be able to copy variables for the end time from the event meta (there’s examples of this in the event list and registration page templates. The venue title could be output by placing the [ESPRESSO_VENUE] shortcode in the widget.php template.

In the widget.php template, the espresso_venue code will need to be wrapped in a do_shortcode and pull the event ID for each event. Here is some example code:

<?php echo do_shortcode('[ESPRESSO_VENUE event_id="'.$event->id.'" show_description=false]'); ?>


tpretzloff

July 27, 2012 at 12:12 pm

I spoke with Seth yesterday, he said it was in the template folder titled event_list_display.php

I played around with it, but could not find exactly where to comment out the price. What line do I need to comment out?

I also need to add start time and End time. Can you tell me the code I need to place in there for that and what line to put it in?


Chris Reynolds

  • Support Staff

July 27, 2012 at 5:21 pm

event_list_display.php is not a folder. It’s a file in the /wp-content/uploads/espresso/templates/ folder. If you do not have an event_list_display.php file in your /templates/ directory, you need to copy that and the event_list.php from the plugin’s /templates/ directory into the one in the /uploads/ folder and make whatever modifications to that file. You probably want to look at these documents if you are planning on doing customizations:

https://eventespresso.com/wiki/put-custom-templates/
https://eventespresso.com/wiki/customizing-your-upcoming-events-widget-using-css-and-template-files/


tpretzloff

July 28, 2012 at 11:11 am

Chris, I understand that I need to move the event_list_display.php file to the /templates folder under the /uploads directory. What I need to know is what line do I comment out in that file so it will not display the price? The page I am talking about it http://www.bluelinedefense.com/permit-to-carry

Also, I want it to display the start and end time of the event. What PHP code do I need to add to display that?


tpretzloff

July 28, 2012 at 4:31 pm

Ok.. I got the time to display in the events_list_display.php

Now the problem is when I put that file in the uploads/espresso/templates folder, it did not work. I had to edit the core events_list_display.php file.

Hod do I get EE to pull the file from the uploads/espresso/template folder?


Josh

  • Support Staff

July 30, 2012 at 8:45 am

The event_list.php and event_list_display.php files need to both be copied over together.

The support post ‘Events List Styling / PHP’ 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