by balajil
@media screen and (-webkit-min-device-pixel-ratio:0) {
ul#menu-top_menu li#menu-item-887 a{ padding: 0 25px 0 25px!important;}
}
@media screen and (-webkit-min-device-pixel-ratio:0) {
ul#menu-top_menu li a{font-family:’RobotoMedium’; font-size:16px; color:#ffffff; text-decoration:none; line-height:43px; padding:0 24px 0 24px; text-transform:uppercase; height:43px; display:block}
}
All Category All Tricks, all hacks CSS
by balajil
<pre>
<?php
if($post->post_parent) {
$parent_title = get_the_title($post->post_parent);
echo $parent_title;
} else {
wp_title(”);
}
?>
</pre>
All Category All Tricks, all hacks Wordpress
by balajil
// <pre>
<script type="text/javascript">
$(document).ready(function(){
$('#tabs div').hide(); // Hide all divs
$('#tabs div:first').show(); // Show the first div
$('#tabs ul li:first').addClass('active'); // Set the class for active state
$('#tabs ul li a').click(function(){ // When link is clicked
$('#tabs ul li').removeClass('active'); // Remove active class from links
$(this).parent().addClass('active'); //Set parent of clicked link class to active
var currentTab = $(this).attr('href'); // Set currentTab to value of href attribute
$('#tabs div').hide(); // Hide all divs
$(currentTab).show(); // Show div with id equal to variable currentTab
return false;
});
});
</script>
</pre>
All Category All Tricks, all hacks Javascript XHTML
by balajil
<?php
global $wp_query;
if( empty($wp_query->post->post_parent) )
{
$parent = $wp_query->post->ID;
}
else
{
$parent = $wp_query->post->post_parent;
} ?>
<?php if(wp_list_pages(“title_li=&child_of=$parent&echo=0″ )): ?>
<div id=”submenu”>
<ul>
<?php wp_list_pages(“title_li=&child_of=$parent” ); ?>
</ul>
</div>
<?php endif; ?>
</pre>
All Category Wordpress
by balajil
<pre>
<?php
$postslist = get_posts(‘include=820′);
if(count($postslist) > 0) :
foreach ($postslist as $post) :
setup_postdata($post);
the_content(); ?>
<?php endforeach; ?>
<?php else : ?>
<?php endif; ?>
</pre>
All Category Wordpress
by balajil
Put the properties in css display inline-block and vertical alignment middle.
ul.logos li img{ display:inline-block; vertical-align:middle}
All Tricks, all hacks CSS XHTML
by balajil
<?php if ( ‘languages’ == get_post_type() ) {?>
<?php query_posts(“post_type=languages&posts_per_page=-1″);
while ( have_posts() ) : the_post();
?>
<li><a href=”<?php the_permalink(); ?>” title=”<?php printf( esc_attr__( ‘Permalink to %s’, ‘twentyten’ ), the_title_attribute( ‘echo=0′ ) ); ?>” rel=”bookmark”>
<?php the_title(); ?>
</a></li>
<?php endwhile; ?>
</ul>
<?php wp_reset_query();?>
<?php
} elseif ( ‘book’ == get_post_type() ) {?>
<?php
}
?>
All Category Wordpress
by balajil
<?php
$postslist = get_posts(‘include=1′);
if(count($postslist) > 0) :
foreach ($postslist as $post) :
setup_postdata($post);
the_content(); ?>
<?php endforeach; ?>
<?php else : ?>
<?php endif; ?>
All Category Wordpress