Skip to content

Instantly share code, notes, and snippets.

@ianpegg
Last active July 20, 2024 13:21
Show Gist options
  • Select an option

  • Save ianpegg/fedff025099e5db13e618c5bc6c0c597 to your computer and use it in GitHub Desktop.

Select an option

Save ianpegg/fedff025099e5db13e618c5bc6c0c597 to your computer and use it in GitHub Desktop.
Registers a custom theme directory as an alternative to the default WP theme directory.
<?php
/**
* Plugin Name: EggMUP: Register Custom Theme Directory
* Plugin URI: https://gist.github.com/ianpegg/fedff025099e5db13e618c5bc6c0c597
* Description: Register an alternative theme directory.
* Version: 1.0.0
* Author: Ian Pegg
* Author URI: https://eggcupwebdesign.com
* php version 7.4.15
*
* @category Must_Use_Plugin
* @package WordPress_Plugin
* @author Ian Pegg <[email protected]>
* @license GNU/GPLv3 https://www.gnu.org/licenses/gpl-3.0.txt
* @link https://eggcupwebdesign.com
*/
namespace EggCup\MUP\CustomThemeDir;
if (!defined('ABSPATH')) {
exit;
}
if (defined('WP_CONTENT_DIR')) {
register_theme_directory(constant('WP_CONTENT_DIR') . '/skin');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment