Home › Forums › Weaver Xtreme Theme › Template Questions

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #19411
    mythusmage
    Participant

    Aren’t there “templates” that contain such instructions as, “get header” or “get sidebar”? Can’t seem to find them via the theme editor, where are they?

    #30075
    Weaver
    Keymaster

    The page templates provided by Weaver Xtreme are rather specialized, and designed to use specific functions to build the page. This design is significantly more complicated than the typical page templates provided by other themes. Why? Six hundred options.

    The specific functions are written to handle the specific page templates supported by the theme. They handle all the different options the theme provides for handling different header layouts, different sidebars, mobile view options, and different footer options. The order that specific HTML and content is emitted depends highly on the selection of featured images and how sidebars are displayed on mobile devices. So there really isn’t a particularly “typical” page template to start with.

    The Page with Posts template is extremely complicated, and is the result of several years of development. It is full of trickery and high level use of the WordPress API. I would not suggest using it unless you simply replace the get_template() calls with calls to your own specific post type theme content templates, while leaving the rest of the code untouched.

    Obviously, the page.php is the default page template for normal pages. But it shares code with other page templates, as well as generating the content output using theme template code in the /templates directory.

    If you just have specialized page content to display, and want to use the standard options for displaying the header, sidebars, and footer (and injection areas), you could just rename the page.php template, and provide a specialized theme content template located in the child’s /templates directory. The child loading mechanism should look for theme templates first in the child’s /templates directory, then the parent’s. Same for page templates – first the child root, then the parent root. If any of this explanation doesn’t make sense, then building a child custom page template may be beyond your current WordPress development level, and you should learn more about page templates, and theme template files before embarking on building a child theme.

    #30076
    Weaver
    Keymaster

    And, you should never, ever use the theme editor to do anything other than inspect files. NEVER NEVER NEVER edit theme files with that editor. ALWAYS create a child theme using a decent programmer’s editor on your own computer.

    I cannot emphasize this enough. The only correct and maintainable way to modify a theme is by creating a child theme. I can guarantee you that 100% of the time, if you try to “fix” something by editing theme files, you will sooner or later have a broken site when the theme is updated. It WILL be updated! When it updates, you lose any and all changes you might have made to theme files. Don’t do it! Build a child theme!

    And for 99.9% of Weaver Xtreme users, there will never really be a need to build a child theme. Almost everything you can conceive can be accomplished with existing options. Adding the Weaver Xtreme Plus plugin adds almost everything you need (mostly extra HTML insertion areas and totally customizable fonts stacks) to build a totally custom site without the need for a child theme.

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.