Last active
August 29, 2015 14:01
-
-
Save ambercouch/dc73d27a41f2eaf31943 to your computer and use it in GitHub Desktop.
Wordpress as a sub-module
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
##Put our core files and folders in the cms folder | |
##Put our content files and folders in the content folder | |
|--my_wp_folder | |
| |--index.php | |
| |--wp-config.php | |
| |--wp-wapper-config.php | |
| |--cms | |
| | |--wp-admin | |
| | |--wp-includes | |
| |--content | |
| | |--themes | |
| | |--plugins |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Front to the WordPress application. This file doesn't do anything, but loads | |
* wp-blog-header.php which does and tells WordPress to load the theme. | |
* | |
* @package WordPress | |
*/ | |
/** | |
* Tells WordPress to load the WordPress theme and output it. | |
* | |
* @var bool | |
*/ | |
define('WP_USE_THEMES', true); | |
/** This now points to our wordpress folder in this instancs the WP core files are in the cms folder */ | |
/** Loads the WordPress Environment and Template */ | |
require('./cms/wp-blog-header.php'); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** Include this in your wp-config file before the last require statement */ | |
/** | |
* Set custom paths | |
* | |
* These are required because wordpress is installed in a subdirectory. | |
* In this example WP core files are in the csm folder. | |
* The wp-content files are in the content folder. | |
*/ | |
if (!defined('WP_SITEURL')) { | |
define('WP_SITEURL', 'http://' . $_SERVER['SERVER_NAME'] . '/cms'); | |
} | |
if (!defined('WP_HOME')) { | |
define('WP_HOME', 'http://' . $_SERVER['SERVER_NAME'] . ''); | |
} | |
if (!defined('WP_CONTENT_DIR')) { | |
define('WP_CONTENT_DIR', dirname(__FILE__) . '/content'); | |
} | |
if (!defined('WP_CONTENT_URL')) { | |
define('WP_CONTENT_URL', 'http://' . $_SERVER['SERVER_NAME'] . '/content'); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment