Montezuma is different from most other themes. With other themes, you have maybe a screen or two of different options that can be set. With Montezuma, though, you work with the theme in much the same way that a “traditional” WordPress developer would, by using templates and CSS files. If you have a background in web development, you will appreciate the power and flexibility that Montezuma gives you over other themes. If you don’t have a web development background, you’ll have a bit of a learning curve, but the hours you put in to learning how to use the theme will be worth it, especially if you will be supporting or developing multiple sites in the future.
You should be familiar with getting around in WordPress, and have hopefully worked with a few themes (although that is not strictly necessary).
You should have a good basic foundation in HTML and CSS, or at least be willing to learn. This cannot be emphasized enough. This knowledge will also help you customize other themes, but is especially important with Montezuma. There are good tutorials at W3Schools. For HTML, you should know the basic web elements, and understand concepts like making sure elements are nested properly. For CSS, besides the basics, you’ll need to know what the different selectors mean. It will also be helpful to understand how to use media queries if you plan on making changes for different viewport sizes, like a mobile phone screen.
You should learn how to use a web debugging tool like Firebug, which is a free extension for Firefox, or Chrome Developer Tools, which comes built-in with Chrome. These tools will enable you to instantly see what CSS rules are affecting a particular element, i.e., all you need to do is right-click on an element on a site and select Inspect element to see everything about it.
The Montezuma options that you will be working with most are the virtual CSS files and the virtual templates (both Main and Sub templates). The virtual CSS files are under Montezuma Options → CSS Files and the virtual templates are under Montezuma Options → Main Templates and Sub Templates. They are called “virtual” because they don’t physically exist as individual files. Instead, the contents of the virtual CSS files are actually stored in a WordPress table. When a change is saved to any of the virtual CSS files, a physical file combining all of the virtual CSS files is written to /wp-content/uploads/montezuma/style.css (along with other CSS used for the theme’s overall responsiveness). The use of virtual files almost insures that changes will not be lost when the theme is upgraded.
There are two approaches that can be used when working with the CSS files:
- Hunt down the CSS rule that you want to change in the virtual CSS file and change the rule there.
- Add an overriding rule at the end of the various.css file. Since the virtual CSS files are combined in the order that they are shown in the CSS Files section, any CSS rule placed in the various.css file which has an identical selector to a previous rule will have precedence.
Main and Sub Templates
Read the documentation under both the Main Templates & Sub Templates. The Sub Templates are the parts used to create the Main Templates, and the Main Templates are the “files” used to generate a particular page. You’ll need to understand how the Main Templates are selected for a particular page, which is based upon the WordPress Template Hierarchy. For example, when your user wants to look at a blog page, then the index.php main template is used to create that page. When looking at a single post page, single.php is called (used). You can also create many different custom templates depending upon your site’s needs. For example, if you have pages which has some wider content, and you don’t want to display a sidebar on those pages, you can create a custom template (page-no-sidebar.php, for example), which has the sidebar (widget area) section removed and the content width expanded across the entire row. As you browse through this site, you’ll see many examples of custom templates being used.
Tip: You will want to create a Main template called front-page.php for use as your home page. You can either create it using a copy of index.php or page.php, depending upon whether you want to display posts (like a blog page), or a static page. If you have a front-page.php Main template, it will automatically be called for your home/front page.
You also need to read the documentation under CSS Settings → Editing CSS. Montezuma is built upon a 12-column grid system in order to correctly handle responsiveness, so it’s important to understand how to assign the correct col# class to different elements on the same row. For example, if you look at the page.php virtual main template, you’ll see that the content area is assigned a class of col8 and the sidebar is assigned a class of col4. The col# classes for elements in the same row have to add up to 12 in order for the responsiveness in this 12-column grid system to work correctly. And if you are thinking about moving the sidebar to the left, or adding a second sidebar to the left, you want to read this excellent post on the push and pull classes.
<?php this_would_be_some_PHP_code(); ?>
The most common use of PHP will be to display some sort of information that is stored in a WordPress database table, like the contents of a post, or the name of the post author. If you are interested in learning some basics about PHP, there’s PHP Tutorial for WordPress Users – PHP 101.
Note: You cannot use all of the functions in the WordPress function reference. Instead, you are limited to a distinct set of functions. To see those functions, go to any template file and in the upper right corner, click the tab that is labeled Limited PHP Code.
Other Montezuma Options
Backing Up Your Site
Whenever you have reached a point in your site development where you are satisfied with how the site looks, you should backup your Montezuma settings. Go to Montezuma Options → Export Import → Export Settings. Copy the contents of the Current Montezuma Settings to a text file. If you ever need to restore your site to a previous setting, you can go to the Import Settings section.
The Head Section
If you have any questions regarding the theme, please post them in the Bytes for All Montezuma Support Forum.