Support

Home Forums Event Espresso Premium Showing list of attendees on the registration page

Showing list of attendees on the registration page

Posted: November 18, 2012 at 10:34 pm


aspence

November 18, 2012 at 10:34 pm

Is it possible to add the event’s short description in the sidebar widget (widget.php)? I have everything else displaying the way I’d like but would really like to pull this in as well. Tried using the same code from the event list display but can’t get it to work. Thanks in advance for any help!


Dean

November 19, 2012 at 3:17 am

Yes it is possible. In the widgets.php file (ideally this is a copy in your uploads/espresso/templates directory) around line 129 you will see

 <p><a href="<?php echo $registration_url; ? rel="nofollow">"><?php echo stripslashes_deep($event->event_name) ?> - <?php echo event_date_display($event->start_date) ?></a>

after that if you add:

<?php echo $event->event_desc;?>

it will display the event description. There are a few caveats though. Firstly its advisable to use the More tag to cut off the event description otherwise you will see a lot of text. Also try not to use shortcodes or html in the description that will show as they will not show correctly in the sidebar.


aspence

November 19, 2012 at 9:30 am

Perfect, thank you!


aspence

November 19, 2012 at 2:25 pm

Just realized that the entire description is showing on the widget. Short description is working on the event list though. (Short description set to yes in template settings and am using the more tag). Any idea what I need to do on my widgets.php page? Thanks!


Dean

November 20, 2012 at 3:14 am

Hi,

Yes I realised what was wrong, I even mentioned it but didnt think, the shortcodes don’t work so why would the more tag?

Unfortunately we don’t have a simple way to reduce the size of the description without using a PHP function to shorten it.

A quick browse led me to a few things but this one seemed fairly straightworward – the 180 is the number of characters to display
http://forums.digitalpoint.com/showthread.php?t=156739

<?php                                   
$paragraph = $event->event_desc;
$rough_short_par = substr($paragraph, 0, 180); 
$last_space_pos = strrpos($rough_short_par, " "); 
$clean_short_par = substr($rough_short_par, 0, $last_space_pos);
echo $clean_short_par;              
?>


aspence

November 20, 2012 at 7:35 am

you’re awesome! thanks!


Dean

November 20, 2012 at 1:12 pm

No problem!

The support post ‘Showing list of attendees on the registration 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.
Documentation for EE3 and EE4
Documentation for Event Espresso 3

Documentation for Event Espresso 4

Status: closed

Updated by  Dean 6 years, 12 months ago ago

Topic Tags

Tagged: ,

Notifications

This topic is: resolved
Do NOT follow this link or you will be banned from the site!
[for="input_96_5_3"]
[for="input_96_5_3"]
[gravityform id=96 title=false description=false]
  • This field is for validation purposes and should be left unchanged.
[i]
[i]
[gravityform id=69 title=false description=false]
  • This field is for validation purposes and should be left unchanged.