Grow your CSS skills. Land your dream job.

Where to store php scripts in WP theme

  • # June 25, 2013 at 12:05 pm

    Where would you guys store your own scripts in a WP theme?

    I have a php script to process a form, would you put this in the root of the site or the root of the theme?

    Just wondering what was best practice.

    # June 25, 2013 at 12:09 pm

    I would just put it in the existing functions.php actually.

    # June 25, 2013 at 12:20 pm

    I try to keep anything that is specific to the site at hand inside the theme folder that I’m using. This is really only an appropriate approach when you’re dealing with a custom set up where you don’t expect the user to be changing themes.

    # June 25, 2013 at 12:59 pm

    Thanks guys.

    Never thought about the functions.php although in this instance I think I’d rather keep this separate.

    It is a custom theme and it won’t be changing so I’ll go for the second option.

    Cheers lads.

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".