General Theme Compatability
As long as Compatability Mode is turned on, MyBookTable should integrate nicely with most WordPress themes. However some themes will show incorrect elements or strage layouts on MyBookTable pages.
The first thing you can do to try to resolve this is to try taking the plugin out of Compatability Mode and seeing if that works better for you. This can actually solve layout issues on some themes, however with most themes using MyBookTable without Compatibility Mode will break your layout on MyBookTable pages by shifting your sidebars or page contents into incorrect positions. This happens because without Compatability Mode turned on MyBookTable uses templates of its own to display these pages and its impossible for MyBookTable to know exactly what markup your theme uses.
If you know how to edit PHP files, you can add full support for your theme by overriding the wrapper templates that MyBookTable uses with your theme’s wrapper code.
Finding your theme’s wrapper code
You can extract the wrapper code that MyBookTable needs from the page.php file in your theme. Open up the page.php file in the text editor of your choice and find The Loop section (see The_Loop). The Loop usually starts with:
and usually ends with:
But this varies somewhat between themes. The wrapper code is everything around The Loop, which means that everything before The Loop will be your starting wrapper code and everything after The Loop will be your ending wrapper code.
Creating the templates
Once you have found your wrapper code, you want to copy the starting wrapper code the into a wrapper-start.php file and the ending wrapper code into a wrapper-end.php file. All theme-specific MyBookTable templates go in a mybooktable folder in your theme, so the wrapper-start template should be saved at wp-content/themes/YOURTHEME/mybooktable/wrapper-start.php and similarly the wrapper-end template should be saved at wp-content/themes/YOURTHEME/mybooktable/wrapper-end.php.
Once you’ve created these two files MyBookTable should work properly with your theme without Compatability Mode.
Grid View Compatability
Grid View is a new feature available in the Professional and Developer Upgrades for MyBookTable 2.0. This feature overrides some templates used by the default MyBookTable layout to display books in a grid instead of a simple vertical list, which is much more efficient for users with large numbers of books.
By default Grid View overrides the following templates:
excerpt-book.php
excerpt-book/
after.php
before.php
images.php
If you are a theme developer and wish to change how your theme looks in Grid View, you can add a custom mybooktable_gridvew template folder to your theme and use it to override the Grid View templates like so:
function yourtheme_add_gridview_template_folder($folders) {
$folders[] = get_template_directory().’/mybooktable_gridview/’;
return $folders;
}
if(function_exists(‘mbt_get_setting’) and mbt_get_setting(‘enable_gridview’)) {
add_filter(‘mbt_template_folders’, ‘yourtheme_add_gridview_template_folder’);
}