Getting started

Wonderflux is distributed under the GPL v2 license and just like WordPress is free to download, use and modify. YES, you can use Wonderflux on as many commercial, non-commercial and personal WordPress websites as you wish without any a fee, subscription or credit required (but it would be appreciated!)

Anyone is welcome to suggest ideas or code on GitHub, the goal is to develop a fantastic professional theme framework for everyone to use, for free, to make amazing WordPress sites!

Help and documentation

The Wonderflux documentation site is a (slowly!) growing reference of all the functions, hooks and filters you can use in your child themes. Apologies, coding is much more fun than writing documentation, but there is fairly complete in-line code documentation in the wf-includes directory files for your reference if you dig around.

Getting started

Wonderflux is a theme framework (sometimes called a parent theme) that you use by building your own child themes. You simply have both Wonderflux and your child theme uploaded to your normal WordPress theme directory.

By activating your child theme in the WordPress admin area just like a normal theme, it will automatically use files and functionality from Wonderflux, giving you a powerful toolkit and dynamic CSS layout grid to rapidly develop bespoke WordPress themes for any purpose.

Child themes can be as simple as a single style.css file, or include any number of files that override or add functionality to Wonderflux or your website. A simple rule to remember is that if a core Wonderflux theme layout file exists in your child theme directory (eg header-content.php) it will be used instead of the core Wonderflux file. Read more about this in the Template parts section below.

Only advanced developers will need to actually override other standard Wonderflux template files in their Wonderflux child theme, for example header.php or footer.php

IF YOU OVERRIDE THESE YOU SHOULD DUPLICATE THE CORE FILE FROM WONDERFLUX INTO YOUR CHILD THEME DIRECTORY, this will ensure you retain the Wonderflux structure and hook system to give you the perfect starter file to begin playing with!

WFX Girder – a demonstration theme

The quickest way to begin learning how to use Wonderflux is to download the WFX Girder demonstration child theme and examine the file structure and code. There are lots of comments in the file to get you started.

Download WFX Girder theme

Template parts

These important files contain very simple content and layout. Separating the surrounding layout logic and code from the actual content makes the files simpler to edit. They can be thought of as re-useable parts that help avoid repetition of code.

An example is loop-content.php – used to display the main content of your site. Instead of repeating common CSS classes and layout just edit this one file, or see below on optionally extending with location awareness for more complex configurations.

If you have not worked with theme frameworks, parent themes or get_template_part() before – welcome to the future of WordPress theme development… and this barely scratches the surface of what Wonderflux can do for you!

Any file that has ‘-content’ in the name is a template part:

  • header-content-php
  • loop-content.php (used to display main content)
  • sidebar-content.php
  • footer-content.php

Extend template parts with location awareness

Wonderflux extends the principle of template parts by adding location awareness. This automatically adds the ability to use files such as header-content-category.php which will override header-content.php when viewing a category archive.

Location awareness works automatically – if the file exists it gets used, otherwise it falls back to using the default file (the last listed). You will see the files shown below in the order, or cascade of files that will be used in given locations. We are using template part loop-content.php as an example template part, but this will work with any main template part, or indeed your own files if you use the wfx_get_template_part() function:

  • SINGLE POST (INCLUDING CUSTOM POST TYPES) NOTE: Normal ‘post’ post type uses loop-content-single.php NOT loop-content-single-post.php
    1. loop-content-single-{POST-TYPE-SLUG}.php
    2. loop-content-single.php
    3. loop-content.php
  • CATEGORY ARCHIVE
    1. loop-content-category-{CATEGORY-SLUG}.php
    2. loop-content-category.php
    3. loop-content.php
  • TAXONOMY ARCHIVE
    1. loop-content-taxonomy-{taxonomy-name}-{taxonomy-term}.php
    2. loop-content-taxonomy-{taxonomy-name}.php
    3. loop-content-taxonomy.php
    4. loop-content.php
  • TAG ARCHIVE
    1. loop-content-tag-{tag-slug}.php
    2. loop-content-tag.php
    3. loop-content.php
  • DATE ARCHIVE NOTE: 4 digit year, 2 digit month with leading zero if less than 10
    1. loop-content-date-{YEAR}-{MONTH}.php
    2. loop-content-date-{YEAR}.php
    3. loop-content-date.php
    4. loop-content.php
  • AUTHOR
    1. loop-content-author.php
    2. loop-content.php
  • HOMEPAGE
    1. loop-content-home.php
    2. loop-content.php
  • SEARCH
    1. loop-content-search.php
    2. loop-content.php
  • ARCHIVE
    1. loop-content-archive.php
    2. loop-content.php
  • ATTACHMENT
    1. loop-content-attachment.php
    2. loop-content.php
  • PAGE
    1. loop-content-page.php
    2. loop-content.php
  • 404 ERROR PAGE
    1. loop-content-404.php
    2. loop-content.php

The dynamic CSS grid layout system

Wonderflux generates a complete CSS grid layout system based on Blueprint CSS, the difference is you can configure the number and width of columns, site container width and more by going to the Wonderflux options page.

The core CSS layout is generated by the following values:

  • Site container width unit (default size)
  • Number of columns
  • Site container position
  • Main content width
  • Sidebar 1 width
  • Sidebar 1 position

More advanced development

The entire grid configuration and all wrapper output can be filtered and removed if required – remember this is a framework! Oh and if you spot somewhere that needs a filter or more flexibility, just let me know on the GitHub issues page.

DON’T HACK WONDERFLUX!

You should not modify the Wonderflux theme framework to avoid issues with updates in the future. One of the main advantages of using a theme framework is the ability to update the core framework to quickly and easily support future versions of WordPress and improve performance and functionality.

There are lots of ways to use Wondeflux from your child theme:

  1. Filter the layout values to change the layout configuration at any time (including underlying CSS grid system).
  2. Create a main template file with the same name in your child theme – this will be used instead of the core Wonderflux file.
  3. Create a function with the same name as a core Wonderflux display function in your child theme – this will be used instead of the core Wonderflux function.
  4. Remove a core Wonderflux action in your child theme functions.php file.
  5. Add a filter to change or add to the code Wonderflux outputs.
  6. Use over 100 location-aware hooks to detect what type of content is being viewed and automatically add unique content.

If you still feel the need to hack the Wonderflux core code, why not get involved with the project on GitHub, all feedback and contributions are welcome! Visit the GitHub Wonderflux project page.

Let’s discuss about how you can make sure that medicines you get through a mail-order pharmacy are foolproof. Last ten years more than quoter of men aged over 50 reported some degree of erectile difficulties. Other remedies are used to treat problems caused by allergic reactions. If you’re concerned about sexual disease, you have to know about “is it safe to buy viagra online” and “is generic viagra safe“. Perchance you read about “is viagra safe“. Different companies describe it as “where can i buy viagra online safely“. After all, there is a wide range of explanations and physicians are as a rule able to pinpoint your problem through psychological tests. Sometimes medicines can cause side effects. Your medicine is for you only. Never give your medications to other people even if their state appears to be the same as yours.