Posted: April 7, 2014 at 3:16 am
|
We are trying to customize some php-files, for example the Payment Overview page (payment_page.php). But once we upload the page to the wp-content/uploads/espresso/templates-folder, the page turns completely blank, there is nothing on the page. Even if we just change a bit of text in the php-file this happens. We also tried to customize other php-files (such as the invoice template), but the same thing happens. What we are doing wrong? Also, can anyone tell us, which file to change if we want to customize the single events pages? It seems like the themeroller pages only have colors and images, we want to custom the way date, time, price is displayed, remove the title from the top of the page etc. Thanks in advance! ……………… |
|
Hi, If that is the exact folder name used, it is wrong, it should be: wp-content/uploads/espresso/templates/ Examining your site it looks like you have added the payment_page.php to another folder inside the templates folder called “customized files”. Obviously you may have just added it there to disable it, but if not, then it wont work. I would also be cautious about using space in file and folder names. To customise single event pages copy the following files found in the templates folder registration_page.php over to wp-content/uploads/espresso/templates/ It’s important both are copied even if you are only editing one as they are linked files. Same goes for event_list.php and event_list_display.php which controls the event list output. Regarding the invoice template, that would go in wp-content/uploads/espresso/gateways/invoice/ As an aside, every folder also needs a blank file called index.php Hope that helps. |
|
Hi! Thanks, that customized files-folder was a mistake, thanks for spotting that! I removed it and uploaded the payment_page.php and an empty index.php file into the wp-content/uploads/espresso/templates/-folder. But it is still blank. What am I missing? |
Hi Joshua, Where is the original payment_page.php file located that you are copying over? |
|
|
The original file is in the wp-content/plugins/event-espresso/templates. |
So as soon as you remove the payment_page.php file the page will load? Can you send a copy of the file to support@eventespresso.com with a reference to this thread please? |
|
|
Yes, if I remove the customized payment_page.php from the wp-content/uploads/espresso/templates/-folder, the original payment_page.php will load. I’m sending you a copy by email. |
Can you try this version please? If that also fails can you enable WP_DEBUG and see if any errors are thrown: |
|
|
Thanks so much! The version you sent worked perfectly. So what did we do wrong? The same thing happened with other php-files that we tried to customize. How can we fix them? |
It was actually the quotation marks in use around ‘Thank You’ Here’s yours: http://take.ms/z3Zch Mine: http://take.ms/BeVdf Its subtle but makes a huge difference (PHP interprets those differently) if becomes more evident when comparing using something like DiffMerge (For example – http://take.ms/yREfa). Did you copy & paste that line into the template? Which text editor are you using? (I recommend a rich text editor such Sublime Text or Notepad++ for Windows) NOT a word processing package such as Word etc. |
|
|
Thanks! I use the text editor on Mac. And I’m still having problems with other pages going blank. For example, in the invoice template I simply removed a part to remove the online link (I followed these instructions: I’m sending a copy of the invoice file to support@eventespresso.com. |
Hi Joshua, I’d recommend using an editor for the Mac like Fraise (it’s free) and there are other good recommendations here: http://codex.wordpress.org/Editing_Files Generally speaking, if you edit a file and then something goes blank, that means there’s something in your code that’s throwing an error. Sometimes it’s something as simple as a missing bracket, a mistyped quote mark, or a missing semi-colon at the end of a line. You can debug your broken code by setting WP_DEBUG to true in the wp-config.php file: |
|
|
Thanks, we tried using fraise, but it doesn’t make any difference. And we really didn’t change anything else but removed a line of text just as suggested in https://eventespresso.com/topic/trying-to-remove-auto-generated-invoice-pay-online-tag/) |
What does the error message say when you turn on wp-debug? |
|
I tested the template file you sent and found no issues. However it is not clear within the thread you linked that you also need to copy the full Invoice directory to that location. I’m guessing you currently have just the template.php within wp-content/uploads/espresso/gateways/invoice/ So copy event-espresso/gateways/invoice/ to wp-content/uploads/espresso/gateways/ Then modify the template in that new location. This is so that Event Espresso does not overwrite your modifications when we release updates. |
|
The support post ‘Customized php-files turn completely blank on website’ 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.