Skip to content

Instantly share code, notes, and snippets.

@mushon
Forked from skuter80/gist:391713
Created May 6, 2010 16:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mushon/392328 to your computer and use it in GitHub Desktop.
Save mushon/392328 to your computer and use it in GitHub Desktop.
functions.php
<?php
// Adds a home link to your menu
// http://codex.wordpress.org/Template_Tags/wp_page_menu
//function childtheme_menu_args($args) {
// $args = array(
// 'show_home' => 'Home',
// 'sort_column' => 'menu_order',
// 'menu_class' => 'menu',
// 'echo' => true
// );
// return $args;
//}
//add_filter('wp_page_menu_args','childtheme_menu_args');
//____________________________________section 1
//------------------------------------------Add logo to header:
//------------------------------------------Replace Blog Title with Your Logo
function remove_thematic_blogtitle() {
remove_action('thematic_header','thematic_blogtitle', 3);
}
add_action('init','remove_thematic_blogtitle');
function child_logo_image() {
//--------------------------------------Add you logo image code
?>
<div id= "blog title">
<img src="wp-content/images/srsig.png">
</div>
<?php
}
add_action('thematic_header','child_logo_image', 3);
//--------------------------------------------THE LOOP
function remove_index_loop() {
remove_action('thematic_indexloop', 'thematic_index_loop');
}
add_action('init', 'remove_index_loop');
?>
<div id="featured_posts" class="clear">
<a class="prev"></a>
<div class="slide_cont">
<?php
$containter = 1;
$display = 1;
?>
<?php $my_query = new WP_Query('category_name=featured');
while ($my_query->have_posts()) : $my_query->the_post(); ?>
<?php
if (($containter == 1) and ($display >= 4)) {
echo "<ul class='slides' style='display:none;'>";
} elseif ($containter == 1) {
echo "<ul class='slides'>";
} else {}
?>
<li>
<h3 class="long"><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></h3>
<a href="<?php the_permalink() ?>"><img width="260" height="120" src="<?php $values = get_post_custom_values('featured'); echo $values[0]; ?>" alt='<?php the_title(); ?> Thumbnail Image' /></a>
</li>
<?php
$containter++;
$display++;
?>
<?php
if ($containter >= 4) {
echo "</ul>"; $containter = 1;} else {}
?>
<?php endwhile; ?>
</div> <!-- end #slide_cont -->
<a class="next"></a>
</div> <!-- end #featured_posts -->c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment