====== K2 Setup ======
Updated for:
* FAlbum 0.7.1
* WordPress 2.5.1
* [[http://getk2.com/|K2 1.0 RC6]]
===== falbum.php =====
In the **\wordpress\wp-content\themes\k2** directory. Create a new file named **falbum.php** and copy the below code into it.
For Wordpress 2.5.1 and K2 v1 RC6 revision 692, create an Falbum template using the following code:
ID = $page_id;
$wp_query->is_home = false;
$wp_query->is_page = true;
$wp_query->queried_object->ID = $page_id;
$wp_query->queried_object_id = $page_id;
}
get_header(); ?>
can_edit) { ?>
page_id = '.$post->ID.''; }
?>
show_photos(); ?>
In FAlbum settings make sure to set the "Selected Style" preference to "_current_wordpress_theme". The changes to the header file are not required.
For older versions (Falbum 0.6.6, Wordpress 2.0.4 and K2 0.9)
**falbum.php**
ID = $page_id;
$wp_query->is_home = false;
$wp_query->is_page = true;
$wp_query->queried_object->ID = $page_id;
$wp_query->queried_object_id = $page_id;
}
get_header();
?>
can_edit) { ?>
page_id = '.$post->ID.''; }
?>
show_photos(); ?>
===== header.php =====
In the **\wordpress\wp-content\themes\k2** directory. Replace **header.php** with the following code:
**header.php**
comment_status) or ('comment' == $post-> comment_type) )) {
wp_enqueue_script('k2comments');
}
?>
>
is_album_page()) { ?>
get_page_title(); ?>Tag Archive for Archive Search for at
>
',''); ?>
===== Please Fix Above Code =====
FIXME There are two instances closing the head tag (). I don't know which is correct. I deleted the second and it worked on my site. Thanks. FIXED
===== WordPress page setup =====
* Go into Wordpress Admin and create a new page.
* Enter the Page Title that you what the header tab to be named (ex. "Photos").
* For the Parent Page make sure //Main Page (no parent)// is selected
* You can then assign assign the newly created template with the name //FAlbum Page Template// (this is the falbum.php file above). However this is **not** required. The FAlbum code already checks for the falbum.php file in the template directory. If it is found then it will use it, otherwise it will run the existing code found in album.php.
* The page slug can be assigned to ex. "photos-main" (It should not be the same value you used in falbum configuration for the URL root value).
* Then go and run the new page.
*You should see a page_id value displayed on the page. You will then need to edit the **wordpress\wp-content\themes\k2\falbum.php** file again and change the page_id value from null to the number shown.
**Example**
Old:
$page_id = null; //Change this to match your sites WP page id of new Photos page
New:
$page_id = 2; //Change this to match your sites WP page id of new Photos page
Then remove the following code in the falbum.php file:
page_id = '.$post->ID.''; }
?>