Support

Home Forums Event Espresso Premium Modify [ESPRESSO_EVENT_ATTENDEES event_id=your_event_id] – add qty & custom qstn

Modify [ESPRESSO_EVENT_ATTENDEES event_id=your_event_id] – add qty & custom qstn

Posted: March 23, 2018 at 3:25 pm

Viewing 4 reply threads


RodeoCES

March 23, 2018 at 3:25 pm

Hello,
This topic has been discuss previously but I can’t see to get the PHP Code to take. I’ve updated the following question id to 11. https://gist.github.com/joshfeck/63fe625950c9a71e19be

Here are the steps I’ve done so far:
1. Created a site specific plugin
2. Grabbed the code at the above link.
3. Pasted that into my site plugin
4. Updated the question ID to 11
5. Save

But I get an error “Something went wrong. Your change may not have been saved. Please try again. There is also a chance that you may need to manually fix and upload the file over http://FTP.”.


Tony

  • Support Staff

March 26, 2018 at 2:08 am

Hi there,

At a quick guess I’d say your likely including the opening <?php tag when copying the code over: https://gist.github.com/joshfeck/63fe625950c9a71e19be#file-content-espresso_event_attendees-php-L1

If you are already within a site specific plugin with an open PHP tag of its own then you can’t open another tag, so if you are including that line, remove it before saving.

If thats not the problem, we’ll need to see the code you trying to save, so before hitting save, copy all of the contents to something like Pastebin and post a URL here for us to view.

We also advise against using the WP built in code editors, as if your code fails it can bring down the site (whist screen) and will require FTP to fix, if you don’t have that its then a panic to find them to fix the problem. The editors have improved a fair amount with the above error checking but it’s still better to use FTP.


Tony

  • Support Staff

March 26, 2018 at 2:10 am

Actually, whilst the above is valid, your problem is different.

The above code does not go within a site specific plugin, it’s a replacement template file which goes within the root directory of your child theme.

So starting from the beginning, are you using a child theme to store customizations?


RodeoCES

March 26, 2018 at 12:06 pm

Hello Tony,
No, I have not created any child theme. The only thing I’ve done was create a site specific plugin to house the PHP codes for the countdown counter ( ‘FHEE__registration_page_wrapper_template__display_time_limit’) to the registration page and the login redirect for My Events (‘FHEE__Espresso_My_Events__process_shortcode__redirect_to_login_instructions’).


Josh

  • Support Staff

March 26, 2018 at 3:54 pm

We recommend adding custom templates to a child theme. You can learn how to set up a child theme for your site from this guide:

https://codex.wordpress.org/Child_Themes

If you prefer to not set up a child theme, then another option you can use is copy the template file over to /wp-content/uploads/espresso/templates.

Viewing 4 reply threads

The support post ‘Modify [ESPRESSO_EVENT_ATTENDEES event_id=your_event_id] – add qty & custom qstn’ 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