Why does footer.php include <?php wp_footer(); ?> call?
It acts as a hook for plugins and is considered an essential theme hook.
does the new foot.php also include call <?php wp_footer(foot1.php); ?>?
Yes.
Thread Starter
mugger
(@mugger)
Seems not to matter.
Calling <?php get_footer(foot2.php); ?> displayed footer.php.
Here’s my page file:
<?php
/* Template Name: page(foot2) */
get_header(); ?>
<div id="content" class="" role="main" style="width:700px;padding:0 0 0 20px;">
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<div class="post" id="post-<?php the_ID(); ?>">
<!-- <h2><?php the_title(); ?></h2> -->
<!-- <div class="entry"> -->
<div style="width:740px;">
<?php the_content('<p class="serif">Read the rest of this page »</p>'); ?>
<?php wp_link_pages(array('before' => '<p><strong>Pages:</strong> ', 'after' => '</p>', 'next_or_number' => 'number')); ?>
</div>
</div>
<?php endwhile; endif; ?>
</div>
<?php get_footer(foot2.php); ?>
<br />
and my foot2.php
<?php /* Template Name: foot2 */ ?>
<div id="footer" role="contentinfo" style="width:720px; margin:0 auto; border-top:1px #ccc solid;">
<span style="font-weight:bold;">Wordpress modified by xxxxx. <a href="longurl">Contact Webmaster</a></span>
<a href="anotherurl/blog/">blog</a>
<br /><br />
</div>
</div>
<?php /* "Just what do you think you're doing Dave?" */ ?>
<?php wp_footer(foot2.php); ?>
</body></html>
I’m okay editing page.php and footer.php, but not in letting more than one footer be selected.
Thread Starter
mugger
(@mugger)
Is no one willing to explain making different footers on different pages? I thought I followed the docs.
use <? include (foot2.php) ?>
I manage to get alternate footers by this code. However the background-color won’t change according to the css file. What is overriding this? I didn’t know where else to post this. Anyone?
`<?php if (is_page(’21’) ) : ?>
<?
include( TEMPLATEPATH . ‘/footer.php’ );
?>
<?php else : ?>
<?
include( TEMPLATEPATH . ‘/foot2.php’ );
?>
<?php endif; ?> `
CSS:
#footer{
width:100%;
height:300px;
background-color:#fff;
float:left;
margin:0px 0px 40px 0px;
}
#foot2{
width:100%;
height:200px;
background-color:#bedef5;
float:left;
margin:0px 0px 40px 0px;
}