WordPress.org

Ready to get started?Download WordPress

Forums

Subcategory call (4 posts)

  1. kaiiser
    Member
    Posted 6 years ago #

    Hi, i´m using wp 2.3 now.
    i got a question, which i can´t find. i tried codex, google, blogs. maybe someone can help:

    the blog i´m working on is a newspaper-style blog. i want to make it look pretty analog and so i need to get the title of 'only the subcategory' beyond a post.

    for e.g.

    title
    post content
    page xy

    while page xy is: [text]page[/page] xy (=id of subcategory) ... i´m not that bad at css, but i´m not really into php, so i only understand vague what´s happening. enough for copy-paste-action but too less to manage this one.

    thanks. help would really be appreciated!

  2. kaiiser
    Member
    Posted 6 years ago #

    no one knows how to call the id of a subcategory?

  3. moshu
    Member
    Posted 6 years ago #

    There is no special ID for subcategory. A cat ID = cat ID; that's it.

    However, I have to confess: I couldn't figure out what is it that you want. Your description is very confusing.

  4. kaiiser
    Member
    Posted 6 years ago #

    hi moshu,
    it´s not my description. it´s my mother-tongue that let me build sentences that make less sense in english ;)

    * i just want to call the id of a subcategory. for e.g
    [text]blabla[/text][sub-cat]id[/id] similar to ...

    <?php the_category(' '); ?>

    ... but only the id (=number)
    i don´t really know how to search for this question.

    * my second question (what would be an alternative to what i´m searching for) would be the subcategory-name like ...

    <?php the_SUBcategory(' '); ?>

    ... It´s just a layout issue. I´m working on a newspaper-style-blog where multiple authors will post. there´s a 'postslug' (=category) for each author which contains different subcategories. Structure will be like

    TITLE (=Category)
    * Posttitle 1 (newest)
    + Subcategoryname
    + excerpt
    + [text]Page[/text][subcatID]#xy[/subcatID]
    * Posttitle 2 (older)
    + Subcategoryname
    + excerpt
    + [text]Page[/text][subcatID]#xy[/subcatID]
    * Posttitle 3 (oldest)
    + Subcategoryname
    + excerpt
    + [text]Page[/text][subcatID]#xy[/subcatID]

    and so on. Hope you can help. I think it´s a small issue, but i simply can´t find the names/functions i need to get this. Thanks a lot!

Topic Closed

This topic has been closed to new replies.

About this Topic