Options: Advanced Options
Weaver Xtreme supports several advanced options allowing extreme site customization. While the Basic version of Weaver Xtreme supports many Advanced Options, some are available only in the Weaver Xtreme Plus version.
PLEASE NOTE: Limited validation is made on the field values, so be careful not to paste invalid code. Invalid code is usually harmless, but it can make your site display incorrectly. If your site looks broken after you add settings in these sections, please double check that what you entered uses valid HTML commands.
Site <HEAD> Section
The <HEAD> Section option (Added Content -> Site <HEAD> Section) includes two major setting areas. These areas are used to provide advanced code to enhance the functionality and style of your site.
The <HEAD> Section
Actions and Filters
This block on the Added Content -> Site <HEAD> Section panel lets you add arbitrary PHP code to your site. This main purpose of this feature is to allow you to add WordPress Actions and Filters for plugins and many standard WordPress actions and filters. This is a very advanced option, and some understanding of PHP code and how WordPress actions and filters work is expected.
Technically, any PHP code you add here will be executed at the very beginning of the theme’s header.php template file. This file does not get loaded and executed until the core WordPress engine has loaded the main theme files (e.g., functions.php), so it will be too late to add actions or filters for many WordPress options. But any actions or filters used to generate content of a page can be added at this point of execution. However, the code can not be used to override pluggable functions in the theme’s functions.php file.
You can add arbitrary PHP code here, but normally this code will just be add_action and add_filter calls, plus supporting function definitions. You can probably add enqueue_style and enqueue_script functions as well, as those functions are typically used later in the header.php file.
The code you define is executed using the PHP eval() function. Any PHP errors will cause failure of the site to load properly. Specifically, you should NOT wrap the code with <?php at the beginning and ?> at the end. You can use them within the code as needed.
HTML Code Insertion Areas
These options found on the various areas under the Added Content -> HTML Injection Areas panel allow you to insert HTML code into various regions of your pages. These areas must use HTML markup code, and all can include WP shortcodes.
Important: You almost certainly will need to provide CSS styling rules for these code blocks, either as in-tag style=”…” rules, or by adding CSS rules the the Custom CSS Rules Section described above. If any of your styling includes float rules, you will almost certainly have to add a
<div style="clear:both;"> to your inserted code. Note: Providing margin style values, including negative values, can be used to control the spacing before and after these code blocks.
The areas are mostly useful for more advanced web site builders, and are most available only in the Weaver Xtreme Plus version.
Each of the HTML insertion sections includes three additional options – Hide on the front page, and Hide on non-front pages, and a background color, and a Custom CSS option. These settings can be used to control where the areas are used.
You can add HTML to the Header and Footer HTML areas in the specialized Header and Footer HTML sections of the Header and Footer sections under the Content panel. This must be HTML markup code (including WP shortcodes), and will be inserted into the header (#header) and footer (#colophon) areas.
For the header, when used in combination with hiding the site title, header image, and the menu, you can design a completely custom header. You can use it for logos, better site name text – whatever.
If you hide the title, image, and header, no other code is generated in the #branding <header> block (HTML 5!), so the code here can be a complete header replacement. You will almost certainly need to add some CSS style, too.
You can also override the CSS #branding rule, create a new div, or use in-line styling. One of the most flexible capabilities of the section is the ability to embed WordPress shortcodes. This might be most useful for adding a rotating header image using a plugin such as Weaver Show Sliders.
For example, assume you’ve installed the Weaver Show Sliders plugin, and have uploaded your rotating header images for the plugin to use. To add this slide show header image, you should first disable the default header image by checking the “Hide Header Image” in the Main Options tab. Then, add this code to the Header HTML content box on the Header options tab:
<div class=”aligncenter”>ERROR with [show_slider name="header-images"]: You must specify a valid slider name.</div>
Note that the built-in aligncenter CSS class will ensure the slide show is displayed properly. Without appropriate CSS styling, you may get unexpected placement of the plugin output. The aligncenter class will usually do what you want.
Pre-Wrapper and Post-Footer Code
These areas are included with the free version of the theme. The HTML from these boxes is respectively inserted before and after the #wrapper <div>.
Pre-Header, Pre-Container, Pre-Comments, Post-Comments, Pre-Footer, Post-Footer, Pre-Sidebar
These areas can be used to insert HTML and shortcodes in the given areas of a site page. These options are available only in the Xtreme Plus version. Each of these areas a wrapped in an “#inject_areaname” <div>. The name is included on the admin page. In order to get proper display, you may have to add an extra empty <div> in your code block to clear the floats: <div style=”clear:both;”></div>. You could also include that in a CSS rule for the respective ‘#inject_xxx” rule.
WordPress supports several kinds of pages that are often called “Archive” pages. These include pages that will display different post archives such as by category, tag, author, or date. It also includes the search page. Normally, such pages will include a title that describes the archive page type. In the Plus version, this tab allow you to hide those titles.
- .category-archive-meta – category description
- .archive-title-label – general archive view – e.g., by date
- .tag-archive-meta – tag description