WordPress with Isotopes

I finally managed to get my WordPress theme (based on roots101) working with isotopes

I mainly followed this post: http://jasonskinner.me/2013/04/creating-a-filterable-wordpress-photo-gallery/

But there were some problems on the way:

– First of all, I stripped out the whole fancybox thing (references, lib and all)
– then I customized the php to find the terms for my custom taxonomy

– Important: I changed the code to use the term slug instead of the name!  The term with whitespace was causing lots of troubles.

– I also added a function that jshint didn’t recognize to .jshintrc

I think those were the main steps apart form configuration and styling of course

The WordPress Template Hierarchy

http://codex.wordpress.org/Template_Hierarchy

The General Idea

WordPress uses the Query String — information contained within each link on your web site — to decide which template or set of templates will be used to display the page.

To see the query string put this in your theme’s page template:

<?php
echo "<pre>"; print_r($wp_query->query_vars); echo "</pre>";
?>

WordPress matches every Query String to query types — i.e. it decides what type of page (a search page, a category page, the home page etc.) is being requested.

Templates are then chosen — and web page content is generated — in the order suggested by the WordPress Template hierarchy, depending upon what templates are available in a particular WordPress Theme. Read More

Roots 101 – Notes, tips, and more

1. The Theme Wrapper

http://roots.io/an-introduction-to-the-roots-theme-wrapper/

The goal of a theme wrapper [3] is to remove any repeated markup from individual templates and put it into a single file. This file, base.php becomes the single, unambiguous, authoritative representation of knowledge (i.e. the base format code).

You never need to make calls to get_header()get_footer() or get_sidebar() again. You can also refactor the base format of your site by editing  base.php. Read More

WordPress with GIT, WP-Skeleton and Roots 101

Goals: – Keep a local WordPress  installation under version control (but ignore WordPress core files) – Use WP-Skeleton (wordpress core as submodule in separated folder, content and config files in root) – Use the starter theme Roots 101 – Deploy to a staging and production server (depending on the current Git branch?) – Keep uploads out of version control, sync them separately – Use a good DB migration strategy – If possible: automate repetitive tasks Read More