Directory Plugin Child Themes - A Tutorial

Plugins can have child themes too! (never thought I'd hear or say that). In a previous post, I outlined how to clone the Directory Plugin's default theme.

In this post, I'll show you how to create a child theme, based on Directory's default theme. The benefits of using a child theme to customize the Directory plugin are equal to using a child theme to customizing a parent theme. You future proof your customizations, plain and simple.

Here's how to knock out your own child theme:

1. Go to wp-content/plugins/directory/themes directory
2. Create a new directory: childtheme
3. In the childtheme directory, create style.css and paste the following code in it:

/*

Theme Name: Directory Child Theme
Theme Date:
Version: 1.0
Theme URI: https://premium.wpmudev.org/
Description: Directory Theme
Author: Tammie Lister, Ivan Shaovchev (Incsub)
Author URI: https://premium.wpmudev.org
WPD ID:
Tags: wordpress
Template: default

The CSS, XHTML and design is released under GPL:
http://www.opensource.org/licenses/gpl-license.php

*/

/* basic styling for all elements */
@import url( ../default/css/layout.css );

4. This code is the default/style.css modified to make the child theme. Lines 3, 12 and 21 are the only lines that were changed.
5. Go to your WP Network Admin --> Sites --> Your Site --> Edit, click on the Themes tab and enable Directory Child Theme

Now, when you go to your sites admin panel (the site you have your directory on), it will look like the screen shot attached to this post.
I. Directory Child Theme 1.0 (achieved through this tutorial)
II. Directory My Theme 1.0 (a clone of the default theme outlined in this post)
III. Directory Theme 1.0 (the original Directory Plugin theme)

Hopes this helps you create some great Directories!

  • fitoussi
    • The Incredible Code Injector

    Thank you David.
    I created a child theme they way you did but the only file i can use is style.css. However, i want to make changes to other files like modern.css which is a big part of the theme design and also functions.php. but i get an error when i am trying to create a functions.php in my child theme.

    Any idea?

    Thank you

  • Tom Eagles
    • Syntax Hero

    Greetings and thanks for being a great community member.
    We haven't heard from you on this one for long and I am doing a regular followup to see if there is still something we can assist you on this thread.
    Just to manage the support issues more efficiently, I am marking this thread as resolved for now however this is not being done to avoid your questions in any way.
    Please feel free to mark this is "Not resolved" in case you have further questions and we would be back on it.
    Thanks a lot for being with WPMU DEV.
    Cheers!
    Tom
    Sales &Support
    Did you know we offer FREE lifetime memberships? Click here to learn more.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.