under construction, as ever :)

WP & Gallery2 & WPG2 embedding ‘fix’

March 28th, 2007 Posted in blogging

Lately i’ve been fiddling around a bit with wordpress, themes ‘n plugins on a separate test blog. In this blog i tried to embed Gallery2, pretty much the same as Wi11ow did some time ago. Ofcourse i also encountered her issue with the double highlighting of tabs, which apparently can be fixed by setting a custom header, but instead i dived into the code involved together with Habbie.

We found that this highlighting issue wasn’t due to the page_links_to plugin as suspected by many of the commenters to that plugin, but simply a lack of information supplied by WPG2, more precisely the info required to adjust the highlighting correctly.

A workaround for this problem is by replacing the following in “themes/K2/header.php”:

if (((is_home()) && !(is_paged())) or (is_archive()) or (is_single()) or (is_paged()) or (is_search())) {

by

if ((((is_home()) && !(is_paged())) && !($g2_wp_init)) or (is_archive()) or (is_single()) or (is_paged()) or (is_search())) {

Obviously i did some reporting of these findings, both in the page_links_to comments and in K2’s bugreportsystem. Ofcourse it’s not really a bug but more of a feature request, but i’d like to see it enabled in future releases since it shouldn’t break anything for non-gallery users.

Post a Comment