WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Mutlisite and functions.php - How this works (3 posts)

  1. Aaron
    Member
    Posted 3 years ago #

    Hey all.

    For some reason I am unable to find any information on this.

    If you are using the same theme throughout a few WP sites running multisites, is there a way to have different functions.php files for each site? If so, where does it live? and can I have a global file as well as individual files?

    My reasoning is that I have some global settings that I want throughout my sites (security stuff) but each site will have a few different custom post types that need to be declared.

    Thanks for any and all help.

  2. is there a way to have different functions.php files for each site

    funtions.php is done by theme, not site.

    That said, you could code into your functions.php a check for WHICH site is running, and then call it like this:

    include("http://yoursite.com/path/to/site-functions.php");

    Or maybe
    include("http://yoursite.com/path/to/site-#-functions.php");

    You'll have to play around.

  3. Aaron
    Member
    Posted 3 years ago #

    Cool. Sounds like a plan. Thanks for the quick response!

Topic Closed

This topic has been closed to new replies.

About this Topic