Tuesday, June 29, 2010

display display something certain page

<div class="sidebars sidebarright">   
<div class="sidebar2">
<?php if (is_page('contact-us')) { ?>
<?php echo do_shortcode('[singlepic id=97]'); ?>
<?php } else { ?>
<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('Wide Sidebar') ) : ?>
<div class="block">
<h3>This is the wide sidebar</h3>
<p>This is a great spot to put some information or a promotion. Use a "Text" widget in your
"Wide Sidebar" sibebar options in Wordpress. Whatever you put in the title will show above
and whatever you put as text (or html) will show right here!</p>
<p>There are a total of 7 widget areas: Wide, Left and Right sidebars, along with footer widgets
Footer1, Footer2, Footer3 and Footer4..</p>
</div>
<?php endif; ?>
<?php } ?>
</div>

Highlighting in main Nav using is_page

<ul id="nav" role="navigation">    <li<?php if ( is_page('home')  )
{ echo ' class="current"'; } ?>><a href="/">Home</a></li>
<li<?php if ( is_page('about') ) { echo ' class="current"'; } ?>><a href="/about/">About</a></li>
<li<?php if ( is_page('work') ) { echo ' class="current"'; } ?>><a href="/work/">Work</a></li>
<li<?php if ( is_page('blog') ) { echo ' class="current"'; } ?>><a href="/blog/">Blog</a></li>
<li<?php if ( is_page('contact') ) { echo ' class="current"'; } ?>><a href="/contact/">Contact</a></li>
</ul>


<?php if (is_category('News')) : else :


if (is_page('Cakes') || is_category('')) {


echo 'id="selected"'


}


endif; ?>