Support

Home Forums Custom Files Add-on (EE3) Location of Custom Files templates

Location of Custom Files templates

Posted: May 2, 2013 at 6:43 pm


Bethany Kemper

May 2, 2013 at 6:43 pm

Is it possible to change the location of the Custom Files addon to something other than wp-content/uploads? I ask because WPEngine doesn’t allow Git deploys to any subfolder of Uploads. Which I find extremely limiting.

Thanks guys!


Seth Shoultes

  • Support Staff

May 2, 2013 at 9:08 pm

You should able to change what directory the files are loaded from within the espresso.php file. We could probably create an action or a pluggable function so that someone can override the file locations, but it may not get added for some time.

 

Also, if you want to, you could try copying the functions/shortcode actions to the your themes functions.php file. Then try adding the shortcodes to your pages.

Hope that helps.

 


Bethany Kemper

May 3, 2013 at 6:46 am

Hey Seth, thanks for the quick response!

I thought about changing the location in espresso.php as well. But my changes would get overwritten every update wouldn’t they?


Josh

  • Support Staff

May 3, 2013 at 7:59 am

They would get overwritten on updates. I think Seth’s idea to copy the shortcode functions to the theme’s functions.php file would be a good work around.


Bethany Kemper

May 3, 2013 at 8:05 am

I’m totally okay with copying functions over to my themes functions file. However, it’s the templates that I’m interested in. I’ve customized the a lot of the default templates like event_detail and even_list_display. Can those be referenced from within my theme as well?


Josh

  • Support Staff

May 3, 2013 at 8:20 am

I’m not familiar with event_detail. Are you referring registration_display.php? If so, then yes, you can copy your modified registration_display.php and event_list_display.php templates into your theme folder and they will load from there.


Bethany Kemper

May 3, 2013 at 10:33 am

My fault, I was referring to the template files I created. If I can indeed move the template files to my theme folder that would make my day!

How do I instruct EE to look in my theme folder? Can you supply example code?


Bethany Kemper

May 6, 2013 at 8:00 am

Sorry to bug you guys again, but may I have an answer to my post above?

Thanks!


Josh

  • Support Staff

May 6, 2013 at 8:13 am

Hi there,

In this case, I don’t see a reason for Event Espresso to need to look in your theme folder. Since they are completely new templates that don’t already exist in Event Espresso, you could place all the shortcode functions in a theme function, then have the functions look in the theme folder for the templates.

Alternatively, if you’re only using templates (not shortcodes + templates), you could set them up as page templates, then use the WordPress template switcher to select the page template you want used for a specific page.

If you’re not familiar with how to use WordPress page templates, here is a great starting point:

http://justintadlock.com/archives/2009/03/13/page-templates-the-untapped-potential-of-wordpress


Bethany Kemper

May 6, 2013 at 9:22 am

That sounds fair.

May I make a suggestion for your team? Our host for this site doesn’t allow for files/folders to be housed in the wp-content/uploads directory while being in version control. Because of this; might I suggest that the custom-files plugin have the ability to specify where those files are located? Instead of the hardcoded location of /uploads?

Thanks for you quick response Josh!


Josh

  • Support Staff

May 7, 2013 at 7:59 am

Hi there,

It’s on the road map to change the custom files add-on into a plugin, so the whole thing will be in wp-content/plugins, which will solve the issue you’re having.

You could actually copy the functions from the custom files add-on into your own plugin and they will load from there. What you’d do is copy the functions that actually load them from the Event Espresso plugin, and change the paths to point to your custom plugin.

The support post ‘Location of Custom Files 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.

Event Espresso