wp-Snap and the Genesis Theme Framework

The wp-Snap plugin is (in our humble opinion) the best Glossary plugin for WordPress, even with the need to manually edit your WordPress theme’s category template. In fact, Saeler.com has used the plugin since before converting from the standard StudioPress Church Theme to the Genesis Theme Framework and custom Child Theme. 

When Genesis first launched there was a lot to learn; frameworks require different way of thought than standard themes. Many of the design elements that required theme template pages are no longer necessary. With a theme framework you only need to modify the way the templates files interact using hooks filters and functions.

Since Genesis had just launched and the new simpler way of modifying themes was’t making sense, the original attempt to merge wp-Snap and Genesis was extremely sloppy and overly complicated. Instead of simply using a hook, an elaborate hybrid of standard and framework code was used to create a category template for the Glossary category.

Sloppy wp-Snap and WordPress Integration

Once the “Sloppy code” was used to create a category template it was out of sight out of mind, until today. A couple years out of date; it was time for some clean up.


Now The Clean, Easy Way to Integrate wp-Snap with Genesis


First download/install and activate Genesis Simple Hooks, then under Genesis in your sidebar menu select Simple Hooks.

Next scroll down the page and look for “Loop Hook”, “genesis_before_loop Hook”

genesis_before_loop Hook

Check the box “Execute PHP on this hook?”, then paste in the following line of code; change in_category from X to the category ID.

1
<!--?php if (function_exists( 'wp_snap' ) && in_category(X)) { echo wp_snap(); } ?-->

Finally, customize the way wp-Snap displays by adding/editing the CSS.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
ol.snap_nav {
	display: inline;
	float: left;
	clear: both;
	list-style: none;
}
 
ol.snap_nav li {
	display: block;
	float: left;
	padding: 0 10px 10px 0;
        text-align: center;
}
 
ol.snap_nav li a {
	font-weight: bold
}
 
ol.snap_nav li.snap_selected a {
	cursor: text;
}
 
ol.snap_titles {
	clear: both;
	display: block;
	border: 0;
	list-style: none;
}

Speak Your Mind

*

Notify me of followup comments via e-mail. You can also subscribe without commenting.