Cruiser and K2
I have been getting some emails on how to integrate Cruiser into K2. I did not really set out to make a gallery that would drop into a K2 themed wordpress install but after making a few changes I have come up with an easy way for you K2 users to incorporate the gallery into your site. First of if you have already downloaded Cruiser, you will need to download the new K2 ready Cruiser here.
Installation is still the same as before except now you will need to open up the “style.css” file in the cruiser directory and change this line:
You will need to change this line to the K2 style sheet you are currently using….. depending on your specific set up it would be something like
If you are flying the default K2 style sheet you can simply use this.
I have included the default K2 style sheet in this release of Cruiser so it will work right out of the box. If you do not wish to import your own K2 style sheet Cruiser will still work.
Now we want to add a link from wordpress to your new photo gallery; edit the “header.php” file located in your K2 theme directory. You are basically going to add the following code snipet to the existing unordered list K2 uses for navigation.
Add code above to existing header.php file to match below.
<li class=“<?php if (((is_home()) && !(is_paged())) or (is_archive()) or (is_single()) or (is_paged()) or (is_search())) { ?>current_page_item<?php } else { ?>page_item<?php } ?>”><a href=“<?php echo get_settings(’home’); ?>”>Blog</a></li>
<?php wp_list_pages(’sort_column=menu_order&depth=1&title_li=’); ?>
<li><a href=“PathToYourCruiserInstall”>Photos</a></li>
<?php wp_register(‘<li class="admintab">’,‘</li>’); ?>
</ul>
To see the finished product click here
This should get all the K2 users heading in the right direction. Obviously if you have a heavily modified K2 install this probably won’t work……. But if you know enough to mod K2 then you should be able to mess with the Cruiser style sheet to match your specific theme. For future releases I will try and keep the K2 structure or at least offer a K2 ready Cruiser package.
I am working on a new release for Cruiser which will hopefully have an operable search by name feature. Stay tuned for that!
Leave a Reply