First, this summer was great, but very busy, hence the long wait before starting this section. If you haven’t been reading along, you should go back to the beginning of the Genesis Explained series, though most of the information you need for understanding the admin side of Genesis will be discussed within this section.
Please note, this information is no longer the preferred solution for Genesis 1.8+ and may cause problems
As before, this opening article will focus on a general overview before diving into individual files and functions. Since this is about education I recommend opening the Genesis folder and looking at the files as I describe them. This will help you become more familiar with them so you can reference them later. One other important note, the admin side of Genesis is in flux right now. The theme options are being evaluated and tweaked, especially the styles and javascripts. This is to make it easier for users to navigate and work with, but also for developers to tie into. I will continue to update these articles as needed, but making yourself familiar where where to find the functions and how they work will be much more useful to you in the long run.
That said:
Genesis Admin Files
Open the genesis/lib/admin folder and this is what you should see
- /images
- editor.php
- import-export.php
- inpost-metaboxes.php
- menu.php
- readme-menu.php
- seo-settings.php
- term-meta.php
- theme-settings.php
- user-meta.php
The first item is an images folder and included the images used in the dashboard. Then it moves on to some files. Here is a brief overview, I will go into more detail of each file in follow-up articles unless noted.
editor.php
This file serves one purpose. To prevent the Genesis theme files from being shown in the theme editor unless Genesis is the active theme. This was done because many people were editing Genesis core files not knowing they were part of Genesis as WordPress will show framework parent files in the child theme editor. The changes would be lost on upgrade causing quite a bit of frustration. By making it more difficult to access the files, this makes it less likely that changes will be done on accident. Of course this won’t stop everyone cold, but hopefully it will make them think.
I will not be covering this file later.
import-export.php
This file enables and creates the import export function within Genesis. With this you can copy Genesis settings to another site. It will not copy over widgets and their settings, but anything in the registered settings field can be exported.
inpost-metaboxes.php
This file creates the meta boxes for the posts, pages, and other post types that might be using them.
I want to define “meta boxes” since the term is used several times, but isn’t necessarily understood. The post “meta” is information that is attached to a post. This is typically a custom field, but there is actually a good deal of meta information, but for the sake of this, we’ll just say “custom fields.” For more info you can read up over at the WP Codex. Start with the Post Meta Examples, and drill down to other details. A meta box is an extra box for adding meta information to the post or page. The term meta and user meta work the same with respect to terms and user details.
The default meta boxes include the SEO settings and Layout Options
menu.php
Creates the actual “Genesis” menu and the tabs under it.
readme-menu.php
Adds the read-me.txt file from the child theme to the menu if available, otherwise shows the Genesis read me.
I will not be covering this file later.
seo-settings.php
Creates the SEO settings page which is accessed under Genesis > SEO Settings
term-meta.php
Creates the extra meta boxes for terms. Terms is a catch all for categories, tags, and other taxonomies that might be added.
theme-settings.php
Creates the main Genesis theme settings and sets up the hook for adding additional meta boxes to the theme settings. The hook works differently than the other Genesis Hooks since it is built form WordPress core functionality.
user-meta.php
This file creates and loads the extra meta boxes in the user profile pages.
Again, I encourage you to read through the files. They are already documented to explain the functions and you will have a good head start when the next article comes out. Speaking of that, I will be starting with the menu.php file then move on to cover the menu items added by that file before going to the meta files.
Finally, I will be editing all of the Genesis Explained articles into an ebook. All of the information on the site will remain. The ebook will be compiled into a nice PDF with some additional information and examples. Look for it soon after this series is completed.
To make sure you get the latest articles and are first in line for the Genesis Explained: a Developer’s Guide to the Genesis Framework, make sure you subscribe to the feed or drop your email in the Subscribe Now box on the right.