• Hello,
    i am running wordpress its amazing just i want to do onething there like when some one click to a category posts comes with title example:

    1. aaaaaaaaaaaaaaaaaaaaaaaaaaaaa
    2. aaaaaaaaaaaaaaaaaaaaaaaaaaaaa

    and then when someone click to title post open like it do..

    help me for this please?

Viewing 6 replies - 1 through 6 (of 6 total)
  • You need to use Category Templates and that template should only use code that displays the post title. Means you don’t want that template to use either the_content or the_excerpt.

    As an example if you were using the WordPress Default theme, you would copy wp-content/themes/default/archive.php to wp-content/themes/default/category.php and then delete this code:

    <div class="entry">
    <?php the_content() ?>
    </div>
    
    <p class="postmetadata"><?php the_tags('Tags: ', ', ', '<br />'); ?> Posted in <?php the_category(', ') ?> | <?php edit_post_link('Edit', '', ' | '); ?>  <?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?></p>

    Related:
    Stepping Into Template Tags
    Stepping Into Templates
    Template Hierarchy

    Thread Starter placepk

    (@placepk)

    i am using another template and i cant do this please any other solution

    Thread Starter placepk

    (@placepk)

    in my theme/category.php file has this codes

    <?php get_header(); ?>

    <?php if (get_option(‘artsee_format’) == ‘Blog Style’) { ?>
    <?php include(TEMPLATEPATH . ‘/includes/blogstylecat.php’); ?>
    <?php } else { include(TEMPLATEPATH . ‘/includes/defaultcat.php’); } ?>
    <?php get_footer(); ?>

    </body>
    </html>

    in includes/blogstylecat.php codes are

    <div id=”container2″>
    <img src=”<?php bloginfo(‘stylesheet_directory’); ?>/images/content-top-home-2.gif” alt=”logo” style=”float: left;” />
    <div id=”left-div”>

    <span class=”current-category” style=”margin-left: 30px;”>
    <?php single_cat_title(‘Currently Browsing: ‘, ‘display’); ?>
    </span>

    <?php if (have_posts()) : while (have_posts()) : the_post();
    if( $post->ID == $do_not_duplicate ) continue; update_post_caches($posts); ?>
    <div class=”post-wrapper” style=”margin-bottom: 40px;”>
    <h1 class=”titles2″>” rel=”bookmark” title=”Permanent Link to <?php the_title(); ?>”><?php the_title(); ?></h1>
    <div style=”clear: both;”></div>
    <div class=”post-info”>Posted by <?php the_author() ?> in <?php the_category(‘, ‘) ?> on <?php the_time(‘m jS, Y’) ?> | “><?php comments_number(‘no responses’,’one response’,’% responses’); ?></div>
    <img src=”<?php bloginfo(‘stylesheet_directory’); ?>/images/comment-bottom.gif” alt=”logo” style=”float: left; margin-bottom: 20px;” />
    <div style=”clear: both;”></div>
    <?php if (get_option(‘artsee_thumbnails’) == ‘Hide’) { ?>
    <?php { echo ”; } ?>
    <?php } else { include(TEMPLATEPATH . ‘/includes/thumbnail.php’); } ?>
    <?php the_content(); ?>
    </div>
    <?php endwhile; ?>

    <div style=”clear: both;”></div>
    <div style=”margin-left: 20px; margin-top: 5px;”>
    <?php if(function_exists(‘wp_pagenavi’)) { wp_pagenavi(); }
    else { ?>
    <p class=”pagination”><?php next_posts_link(‘« Previous Entries’) ?> <?php previous_posts_link(‘Next Entries »’) ?></p>
    <?php } ?>
    </div>

    <?php else : ?>

    <h2 >No Results Found</h2>

    <p>Sorry, your search returned zero results. </p>

    <?php endif; ?>

    </div>

    <?php get_sidebar(); ?>
    <img src=”<?php bloginfo(‘stylesheet_directory’); ?>/images/content-bottom-2.gif” alt=”logo” style=”float: left;” />
    </div>

    and in includes/defaultcat.php

    <div id=”container”>
    <img src=”<?php bloginfo(‘stylesheet_directory’); ?>/images/content-top-home.gif” alt=”logo” style=”float: left;” />
    <div id=”left-div”>

    <!–Begind recent post–>
    <span class=”current-category”>
    <?php single_cat_title(‘Currently Browsing: ‘, ‘display’); ?>
    </span>
    <?php if (have_posts()) : while (have_posts()) : the_post();
    if( $post->ID == $do_not_duplicate ) continue; update_post_caches($posts); ?>

    <div class=”home-post-wrap”>

    <div class=”date”>
    <div class=”month”><?php the_time(‘M’) ?></div>
    <div style=”clear: both;”></div>
    <div class=”day”><?php the_time(‘j’) ?></div>
    </div>

    <div class=”post-right”>
    <div class=”featured-categories”><?php the_category(”) ?></div><span class=”author-link”><?php the_author_posts_link(); ?> </span>
    <div style=”clear: both;”></div>
    <h2 class=”titles”>” title=”Permanent Link to <?php the_title(); ?>”><?php the_title() ?></h2>
    <div style=”clear: both;”></div>
    <?php $thumb = get_post_meta($post->ID, ‘Thumbnail’, $single = true); ?>
    <?php if($thumb !== ”) { ?>
    ” title=”Permanent Link to <?php the_title(); ?>”><img src=”<?php bloginfo(‘stylesheet_directory’); ?>/timthumb.php?src=<?php echo $thumb; ?>&h=165&w=165&zc=1″ alt=”<?php if($thumb_alt !== ”) { echo $thumb_alt; } else { echo the_title(); } ?>” class=”thumbnail” />
    <?php } else { echo ”; } ?>
    <?php the_content_limit(410, “”); ?>
    </div>

    </div>

    <?php endwhile; ?>

    <div style=”clear: both;”></div>
    <div style=”margin-left: 110px; margin-top: 5px;”>
    <?php if(function_exists(‘wp_pagenavi’)) { wp_pagenavi(); }
    else { ?>
    <p class=”pagination”><?php next_posts_link(‘« Previous Entries’) ?> <?php previous_posts_link(‘Next Entries »’) ?></p>
    <?php } ?>
    </div>

    <?php else : ?>

    <h2 >No Results Found</h2>

    <p>Sorry, your search returned zero results. </p>

    <?php endif; ?>

    </div>

    <?php get_sidebar(); ?>
    <img src=”<?php bloginfo(‘stylesheet_directory’); ?>/images/content-bottom.gif” alt=”logo” style=”float: left;” />
    </div>

    Looks like you might want to delete

    <?php the_content(); ?>

    and

    <?php the_content_limit(410, ""); ?>

    Thread Starter placepk

    (@placepk)

    i did it and its working but one more thing if it is possible.. in category there are only shows 5 titles which i have setuped through admin panel like how much posts shows in one page is there any thing to show all post titles in category without changing posts numbers bcoz if i will select there 50 posts per page it will also show 50 posts in main page.. i hope u got me

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘I need to show posts list in category’ is closed to new replies.