Support

Home Forums Community Forum How Do We Switch Widget's Title-Date Order?

How Do We Switch Widget's Title-Date Order?

Posted: January 28, 2014 at 8:00 pm


ermagerd

January 28, 2014 at 8:00 pm

Great plugin!!
Is there any way for us to reverse the order of the widget’s title and date? Provided screenshot below, however I’d like for it to list as “February 14, 2014 – Valentine’s Event”
I’m not super in the programming department, although I even tried searching for areas that might have listed the date in “F j, Y” format, I couldn’t find where to change it? Help is appreciated!! Thanks!!


ermagerd

January 28, 2014 at 8:02 pm

Screenshot: http://rubydragondesign.com/images/title-date-example.png


Tony

  • Support Staff

January 29, 2014 at 4:16 am

Hi ermagerd,

You can change the out of the widget by altering the widget template file.

event-espresso/templates/widget.php

If you look at line 130 you should find

<li><a href="<?php echo $registration_url; ?>"><?php echo stripslashes_deep($event->event_name) ?> - <span class="widget-event-date"><?php echo event_date_display($event->start_date) ?></span></a>

To display the Date first, then the event name, change that to:

<li><a href="<?php echo $registration_url; ?>"><span class="widget-event-date"><?php echo event_date_display($event->start_date) ?></span> - <?php echo stripslashes_deep($event->event_name) ?></a>

When making changes to templates it is advisable to first copy them to wp-content/uploads/espresso/templates/ first and then edit the file there. This will keep you modifications safe from updates.

From time to to we may update the template files, these updates will need to me manually added to you custom template files.


ermagerd

January 29, 2014 at 10:24 am

Hi Tony,
Thank you!! This is perfect πŸ™‚
*I’ve added an altered copy of the widget.php file to the /uploads/espresso/templates area, and applied changes only to the file in the /uploads/ folder — Do you recommend making changes to both of the files, and then if the original is overwritten, we’ll then be able to easily get our alterations from the /uploads/ file? Or is there a way to call to the copied widget.php, so that the changes will always show up, even if the updated template file changes?
I hope that made sense, I need another coffee πŸ™‚
Have a great morning!


ermagerd

January 29, 2014 at 10:26 am

*Sorry for the double post; my silliness — Updating the /uploads/ file did the trick!! Have a have morning!


Tony

  • Support Staff

January 29, 2014 at 10:37 am

Hi ermagerd,

Sorry, I didn’t make that very clear.

Event espresso checks the uploads/espresso/templates/ folder for any modified template versions, if none are found it will load the default ones from event-espresso/templates/

I would actually recommend the opposite of what you posted and to not edit the files within event-espresso/templates/ at all. Instead always copy the file over and edit within /uploads/templates.

Reason being that if for some reason you do have issues with the modified templates, you can always switch back to the default ones easily (there is a button in Event Espresso -> Template Settings)


ermagerd

January 29, 2014 at 2:17 pm

Hi Tony,

No need to apologize — the issue was that I hadn’t updated the file found within /uploads/ – by bad πŸ™‚

Good to note, I’ll be sure not to tamper with the original files, just in case. Thank you!!


Jonathan Wilson

January 29, 2014 at 3:18 pm

ER-MA-GERD! Yes. Please don’t touch those files. hehe. πŸ˜‰

Seriously though… let us know if we can help with anything else.


ermagerd

January 29, 2014 at 4:33 pm

Hehe, thanks, Jonathan!! I’ll be sure to only update the /uploads/ files πŸ™‚
I love this plugin!! Going to buy a license soon, to get more frothy goodness πŸ™‚


Jonathan Wilson

January 30, 2014 at 8:10 am

Great! Let us know if we can answer anymore questions.

The support post ‘How Do We Switch Widget's Title-Date Order?’ 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.

If you would like help from the Event Espresso staff, then please purchase a support licenseΒ right now so you can create a support topic in our premium support forums.

Status: closed

Updated by  Jonathan Wilson 5 years, 9 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.