WordPress.org

Ready to get started?Download WordPress

Forums

List headlines in the category (5 posts)

  1. BORU
    Member
    Posted 5 years ago #

    Hi

    Is this possible in WordPress? I want to show only headlines in the category XY

    For instance I call my Category BOXING and publish many posts in that category but I can only show an excerpt of the post with more } tag or show whole post, but I want only show the headlines like so

    * Mike Tyson has beaten his ear
    * Names of world greatest Boxer
    * The comeback of Frank Shamrock
    ...

    I want to list the headlines like above and I'm using the default theme with widgets pages and categories

  2. MichaelH
    Member
    Posted 5 years ago #

    Are you talking about posts on your blog main page where you have posts from many categories displayed or are you talking about when a category archive showing all the posts from the Boxing category are displayed?

    If on your blog homepage you want:
    Post for Boxing category to display just the title
    Post for Baseball category to display the title and the content

    or if when you display a category archive for Boxing just show the title but not the content?

  3. BORU
    Member
    Posted 5 years ago #

    Hi Michale

    no not Mainpage
    I want to show in 2 Categories for instance Category Cat=44 and Cat=55 not whole post only the headlines
    in Category cat 44 I have many posts they look so
    myheadline1
    text text text text
    text
    {more}

    myheadline2
    text2 text 2text t2ext 2
    text
    {more}

    but I want only list the headlines in the category 44 and 55 like below

    myheadline1
    myheadline2
    myheadline3

    when user click onthis headline then they can read the entire post

  4. MichaelH
    Member
    Posted 5 years ago #

    Using the WordPress Default Theme for example:

    1. Copy wp-content/themes/default/archive.php to wp-content/themes/default/category-44.php
    2. Now edit category-44.php and delete this code:

    <div class="entry">
    <?php the_content() ?>
    </div>

    To understand why the category-xx.php works review Template Hierarchy and Category Templates.

    Related:
    the_content(),
    the_excerpt(),
    Stepping Into Template Tags
    Stepping Into Templates

  5. BORU
    Member
    Posted 5 years ago #

    hi Michael

    that has worked great, thank you. I have a small problem with <ul> <li></li></ul> in the category-44
    I want to list the headlines like here http://www.luna.ch/v4/news.php in the news section but my default theme category-44 lists the headlines so
    ---
    headline
    date time day
    .
    .
    .big blank space
    .
    headline
    date time day
    ------

    how can I delete the big blank space between the headlines so afterthat I get the same

      list like on the page Ive linked above in luna.ch ?
      the code looks so
      ---
      <div class="post">
      				<h4 id="folding_category_list-<?php the_ID(); ?>"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h4>
      				<small><?php the_time('l, F jS, Y') ?></small> -->

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.