WordPress.org

Ready to get started?Download WordPress

Forums

Show categories of diferents ways (7 posts)

  1. rghedin
    Member
    Posted 8 years ago #

    Hi!

    I want to use WordPress like a CMS, but, for this, I need the categories show in diferents ways when I click in there.

    For example: the "A" category will appear with headlines; the "B", will show the excerpts; "C" will show whole post.

    Is it possible in WordPress? How I do this?

    Best regards!

    Ps: sorry my English... I know it's horrible :P.

  2. moshu
    Member
    Posted 8 years ago #

    Yes. You just have to create different category templates for your categories.
    http://codex.wordpress.org/Category_Templates

  3. rghedin
    Member
    Posted 8 years ago #

    Excellent! It's exactly what I was searching :).

    Very thanks!

  4. rghedin
    Member
    Posted 8 years ago #

    One more question: it's possible show "x" (4, for example) entries in a category (ID 5, for example), and "y" (all) entries when I click in other category (ID 4)?

    Best regards!

  5. moshu
    Member
    Posted 8 years ago #

    Yes, if you customize the Loop in the different category templates.
    See: http://codex.wordpress.org/The_Loop
    http://codex.wordpress.org/Template_Tags/query_posts
    and related guides.

  6. rghedin
    Member
    Posted 8 years ago #

    I again :).

    I want to put the posts of a category, in a table with three columns. So, I create this:

    [code]<table border="1"><tr>

    <?php query_posts('posts_per_page=-1&cat=4'); ?>

    <?php if (have_posts()) : ?>

    <?php while (have_posts()) : the_post(); ?>

    <td width="33%">"><?php the_excerpt(); ?></td>

    <?php endwhile; ?>
    </tr></table>[/code]

    I want to know how I do the </tr> appear after the end of every third </td>...

    Was I clear (my English is a shit, definitively...).

    Best regards!

  7. moshu
    Member
    Posted 8 years ago #

    Your English is fine... but your "plan" will not work.
    There is nothing in your code that would tell WP where to 'break' the posts into the next column. Instead of fightomg with tables... you could check out some themes that already achieved to have posts in two columns or maybe even 3.
    For sure, your code above will NOT work.

    (and for posting code see the instructions below the text input field)

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags