display category on index page
-
using wordpress theme Themematic with Gallery by chris wallace
by default the theme displays most recent posts. however i would like it to display categories and the posts that belong to those categories. For example: Click Here thats a little diagram i drew out.
I’ve been trying but not sure if its possible. if not possible is there at least a way to display at least one category? I found this forum topic from wordpress and someone who did it but my code is very different from this person’s.
index.php file from themematic theme:
<?php global $options; foreach ($options as $value) { if (get_option( $value['id'] ) === FALSE) { $$value['id'] = $value['std']; } else { $$value['id'] = get_option( $value['id'] ); } } ?> <?php get_header() ?> <div id="container"> <div id="content"> <?php thematic_navigation_above();?> <?php get_sidebar('index-top') ?> <?php thematic_above_indexloop() ?> <?php thematic_indexloop() ?> <?php thematic_below_indexloop() ?> <?php get_sidebar('index-bottom') ?> <?php thematic_navigation_below();?> </div><!-- #content --> </div><!-- #container --> <?php thematic_sidebar() ?> </div> <?php get_footer() ?>
and this is from gallery theme’s function.php where it creates the content for the index page/posts:
// Creating the content for the INDEX function remove_index_loop() { remove_action('thematic_indexloop', 'thematic_index_loop'); } add_action('init', 'remove_index_loop'); function gallery_index_loop() { global $post; /* Count the number of posts so we can insert a widgetized area */ $count = 1; while ( have_posts() ) : the_post() ?> <div id="post-<?php the_ID() ?>" class="<?php thematic_post_class(); if(function_exists('p75GetVideo')){ if(p75GetVideo($post->ID)){ echo " video"; } } ?>" style="width:670px;"> <div class="entry-content"> <?php childtheme_post_header() ?> <a href="<?php echo the_permalink() ?>"> <span class="slide-title"> <?php echo get_post_meta($post->ID, 'designed-by', $single = true); ?> <div style="width:145px; position:inherit; top:0px;" align="right"> <?php echo the_title(); ?> </div></span> <img class="full-image" src=" <?php if(get_post_meta($post->ID, 'full-image', $single = true)){echo get_post_meta($post->ID, 'full-image', $single = true);} else{bloginfo('url'); echo "/wp-content/themes/gallery/images/thumbnail-default.jpg";} ?>" width="150" height="113" alt="<?php echo the_title() ?>" /></a> </div> </div><!-- .post --> <?php comments_template(); if ($count==$thm_insert_position) { get_sidebar('index-insert'); } $count = $count + 1; endwhile; } add_action('thematic_indexloop', 'gallery_index_loop');
i know its a lot to ask for. but if anyone can help in anyway that would be truly wonderful. Thank you and godbless.
- The topic ‘display category on index page’ is closed to new replies.