WordPress/Themes

From IndieWeb
Jump to: navigation, search

WordPress Themes are a simple way to quickly change the look and feel of a WordPress website primarily by use of CSS.

Contents

Theme Sources

In general, the best and safest place to download themes is directly from the official Wordpress Theme Directory. Themes can also be found on Github and other repositories, but one should take appropriate care to check that they don't include malicious code.

Keep in mind that WordPress maintains two different theme repositories: one on their .com domain which is meant for their own hosted service and a second one on their .org domain. Often popular themes from the .org platform will often be forked and offered on the .com domain, but then aren't always maintained in parallel. Thus there are examples (like Independent Publisher - see below) which have Indieweb related updates which are usable on self-hosted locations, but aren't available to .com customers.

Child Themes

When working with WordPress themes, it's common practice (for security and update reasons) to create a child theme of the original. This allows the user to make any necessary modifications to the functions.php and CSS Style files in the child theme. Doing this will allow the main theme to be updated in the future with bug patches and security updates without overriding the changes made in the child theme.

For details on how to create a child theme, see some of the following resources:


Microformats

Once you have a site running WordPress, you'll want to add microformats 2 (sometimes referred to as mf2) support to your theme if possible. Some themes support microformats or other semantic markup like schema.org. Microformats 2 is not (yet) supported by WordPress or the majority of WordPress themes out of the box, though we hope this situation will change over time. Many services will also fall back to the original microformats standard, which many WordPress themes support.

There are three ways to add microformats2 support (listed in increasing levels of ease-of-use):

  • Modify your theme by hand to add support directly
  • Use the uf2 plugin to add support programatically
  • Use one of the themes mentioned below that support mf2 out of the box


Themes Supporting Microformats

  • The SemPress theme by  Matthias Pfefferle is currently the only theme to support microformats, microformats2 and schema.org (theme). There are also several child themes available on Github listed in the project's instructions as well.
  • Independent Publisher as of v1.7 now supports microformats2 (though could possibly be further improved?) and additionally does some custom display in comments.php to better differentiate between comments, webmentions, pingbacks, and trackbacks. (Nota bene: the WordPress.com version of this theme is a separate fork and doesn't have the mf2/webmentions support.) The theme is actively being developed on GitHub for additional detail, contributions, and support.
  • MF2_s is a starter theme from David Shanske which supports microformats. It is a fork of the popular Underscores starter theme which many developers use as a base for building custom themes. It is under active development with the hopes it will form the basis of future themes.


Solutions for Themes not Natively Supporting Microformats

Rather than a theme supporting it natively, uf2 is a plugin that attempts to add microformats2 data to an existing theme. The author admits it is very limited and recommends using a theme that supports microformats natively. In practice it works well enough with most out-of-the box themes as to be very useful for lots of basic functionality. Be aware that some themes unfortunately use microformat classes for CSS styling rather than just semantics, and this can cause issues (typically only with the way the pages display) when using the uf2 plugin.

Examples of themes that don't work well with the uf2 plugin:

  • Twenty Fourteen - styles the hentry class and causes display issues when uf2 is activated.

One can also create a new theme from scratch to support microformats.

Other Interesting Themes

  • P2 is a microblog theme for WordPress that might be adaptable for indiewebsters, but doesn't have mf2 support out of the box.
  • Ozh Tweet Archive Theme was originally made as a Twitter knockoff theme to be used with the Ozh Twitter Archiver Plugin, but could certainly be used on its own.


Security

Main article: WordPress/Security

The safest place to download free themes is the official Wordpress Theme Directory. A 2011 study found that almost every other source in the top 10 Google results contained malicious code (a 2014 update says the situation has improved but still recommends caution).

Child themes (see above) allow for better future security updates without overriding additional modifications.


WordPress
Topics Getting Started on WordPressPluginsThemesExamplesDevelopmentDataSecurity
Plugins Wordpress Webmention PluginSemantic LinkbacksPost Kinds Plugin
Assistance WordPress Outreach Club


Personal tools
Namespaces
Variants
Actions
Recent & Upcoming
Resources
Toolbox