Posted: September 19, 2014 at 2:56 am
|
How can I add extra text to custom template files. I would like to do something like this below. How it is now:
How I need it to be:
Additional info: |
|
Just to be clear changes made to the template pending_approval.php are not showing in front. Am I editing the wrong template file? |
|
Hi, That looks fine to me, you can copy the /wp-content/plugins/event-espresso/templates/pending_approval.php file over to wp-content/uploads/espresso/templates/ and updates wont over write the changes. |
|
Okay Dean, thanks but I already did that. But changes made to the custom template are not shown on the website after a refresh. I can’t figure this one out. Furthermore if I add a new translated text string |
|
Ahhh sorry I didn’t see it but there’s a typo: you added in a random closing PHP bracket ?> It should just be
Regarding the translation, if you need that string to be translated further, then yes it would have to be added to the PO and MO files. I would suggest modifying the template locally then running the plugin through Poedits “Update from sources” option to generate the new PO and MO files, then upload to the site. |
|
Do you have any further documentation on adding text string via POEDIT? |
|
We don’t, but it’s pretty simple. Make the changes to the code You could also edit the PO file directly but you will still need to open it in Poedit and save so that the MO file gets updated as well. |
|
Hi Dean, I just checked this. Only changes made directly to /wp-content/plugins/event-espresso/templates/pending_approval.php are being update. But if I change the file in /wp-content/uploads/espresso/templates/pending_approval.php nothing happens. How can I fix this problem? |
|
Hi, Not sure if you can unless you point the PO file at the location of the translation. E.g. Please see this pastebin – http://pastebin.com/UKtqMieB I haven’t tested it but I think that would be the only way to do it, as currently it is looking for text within the main plugin files. |
|
I think it doesn’t have anything to do with the PO file because changes made to the template file itself (I.E. changing the h3 into h1) are not shown. Despite other template files where I have no problems at all.. strange. Please advise. |
|
Ahh my apologies, I didn’t quite pick up on the change of topic, I thought you were referring to language changes. This is an issue we are aware of, the pre approval template is not being looked for in the uploads directory. This has been fixed and will be included in EE 3.1.37 (a beta version of 3.1.37 is available in the Pre Release channel in your account page). |
|
Currently i’m running version 3.1.36.5.P and got notified of a new version 3.1.36.6.P. Can I easily update the plugin? |
|
Hi, You can update the plugin sure, though 3.1.36.6 does not contain the fix. The Beta version of 3.1.37 is available in the Pre Release channel (https://eventespresso.com/wiki/pre-release-channel-guide/) but bear in mind it is a beta so there may be unexpected bugs. We normally only recommend using beta on test/development sites. The beta version will notify you of updates as well, just like the normal release does. |
|
I’m only asking about the safe release versions. So I can just over right the plugin with the newer version? |
You can either use the auto updates or manually update by first deleting the current plugin and uploaded the latest version. See here for more details – https://eventespresso.com/wiki/updating-event-espresso/ However as with any update to Event Espresso (or any plugin), if you have modified core files those modifications will be lost. Translations using .MO/.PO files saved within wp-content/uploads/espresso/ will continue to work on the new version. If you are unsure I would recommend performing a full site back (including all files and the database) before updating. We recommend doing this before updating any plugins/themes as a precaution. |
|
|
Thanks Tony. I’ve just updated to 3.1.36.6.P. Everything is fine as far as I can see. Is there an ETA on the 3.1.37 release? |
3.1.37 is currently undergoing internal testing, I can’t give you a date of release currently (as it depends on how testing goes) but we are working on releasing it asap. |
|
|
Ok thanks for letting me know. Hopefully it’s not to long anymore… |
The support post ‘How to add text to custom templates’ 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.