|
|
Updated for:
In the \wordpress\wp-content\themes\disconnected directory. Create a new file named falbum.php and copy the below code into it.
falbum.php
<?php /* Template Name: FAlbum Page template */ //Hack to set WP page id $page_id = null; //Change this to match your sites WP page id of new Photos page global $wp_query; global $post; if ($page_id != null) { $post->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(); ?> <script type="text/javascript" src="<?php echo get_settings('siteurl'); ?>/wp-content/plugins/falbum/res/falbum.js"></script> <script type="text/javascript" src="<?php echo get_settings('siteurl'); ?>/wp-content/plugins/falbum/res/overlib.js"></script> <?php if ($falbum->can_edit) { ?><script type="text/javascript" src="<?php echo get_settings('siteurl'); ?>/wp-content/plugins/falbum/res/prototype.js"></script><?php } ?> <?php /* Remove or comment out the below line after to finding the Photos page page_id */ if ($page_id == null) { echo '<h2>page_id = '.$post->ID.'</h2>'; } ?> <div id="main"> <div id="content"> <div class="page"> <div class="page-info"><h2 class="page-title"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link: <?php the_title(); ?>"><?php the_title(); ?></a></h2> <?php /*Posted by <?php the_author(); ?>*/ ?><?php edit_post_link('(edit this)'); ?></div> <div class="page-content"> <?php $falbum->show_photos(); ?> </div> </div> </div> <div id="sidebar"> <h2>Elsewhere</h2> <?php get_sidebar(); ?> </div> <?php get_footer(); ?> </div> </div> </body> </html>
In the \wordpress\wp-content\themes\disconnected directory. Modify the header.php to include the line between the FAlbum comments.
header.php
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <link rel="shortcut icon" href="http://www.archgfx.net/images/blogrdfbg.jpg" /> <meta http-equiv="Content-Type" content="text/html; charset=<?php bloginfo('charset'); ?>" /> <!-- FAlbum Start - replace the current <title>..</title> entry --> <?php require_once(ABSPATH.'/wp-content/plugins/falbum/falbum.php'); global $falbum; ?> <?php global $falbum;?> <?php if ($falbum->is_album_page()) { ?> <title><?php echo $falbum->get_page_title(); ?></title> <?php } else { ?> <title><?php wp_title(''); ?> <?php if ( !(is_404()) && (is_single()) or (is_page()) or (is_archive()) ) { ?> at <?php } ?> <?php bloginfo('name'); ?></title> <?php } ?> <!-- FAlbum End --> <meta name="generator" content="WordPress <?php bloginfo('version'); ?>" /> <!-- leave this for stats please --> <link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" /> <link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="<?php bloginfo('rss2_url'); ?>" /> <link rel="alternate" type="text/xml" title="RSS .92" href="<?php bloginfo('rss_url'); ?>" /> <link rel="alternate" type="application/atom+xml" title="Atom 0.3" href="<?php bloginfo('atom_url'); ?>" /> <link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" /> <?php wp_get_archives('type=monthly&format=link'); ?> <?php wp_head(); ?> </head> <body> <!-- FAlbum Start - insert after the <body ...> tag - this is used for annotations --> <div id="overDiv" style="position:absolute; visibility:hidden; z-index:1000;"></div> <!-- FAlbum End --> <div id="rap"> <div id="header"> <ul id="topnav"> <li><a href="<?php echo get_settings('home'); ?>" id="navHome" title="Posted Recently" accesskey="h">Main</a></li> <?php wp_list_pages('sort_column=menu_order&depth=1&title_li='); ?> <?php wp_register('<li>','</li>'); ?> <li><?php wp_loginout(); ?></li> </ul> <h1><a href="<?php bloginfo('url'); ?>" title="<?php bloginfo('name'); ?>"><?php bloginfo('name'); ?></a></h1> <div id="desc"><?php bloginfo('description');?></div> </div>
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