Prettyscripts

Making Foundation 5 top bar working with WordPress Menu

wp_nav_menu() is a WordPress function to display menu defined with register_nav_menus() in functions.php. When using foundation framework in a WordPress theme, the standard way to use wp_nav_menu() works if you have a single-level menu, ie no drop-downs. It’s when it’s a multi-level menu with sub-menu in the drop-down that it won’t look nor work properly…

Continue Reading »

WordPress: Feature Image and Post Thumbnails

In WordPress there’s a feature image box in post edit screen. However this feature is theme dependent and is called post thumbnails. It’s a new feature introduced in V2.9 and is enabled through add_theme_support(). This post demonstrates the most basic way to enable and display a feature image. Add the following code to functions.php:

WordPress: Different single post templates

In WordPress, single.php displays a different layout for single posts. This template applies to all posts. To display different layout for different criteria, such as post types, category etc, make use of single_template filter. This example shows a different layout for a specific category, falls back to default if not exists. File naming convention for the template…

Continue Reading »

WordPress: Twentyeleven theme and Add Sidebars to Pages and Single Posts

Twentyeleven is a standard theme that comes with WordPress install (since V3.?). I like the layout, but customizing pages to include sidebar seems unfeasible. apparently it’s the theme’s feature for single posts and pages (as discussed in support group). Remove singular class Have a look at twentyeleven_body_classes() function in functions.php. it addes a ‘singular’ class to…

Continue Reading »