![]() |
|
|||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
I use several category's on my weblog. I would like in each article to see not only the authors name and date/time but also the category in which the specific article was written. How can I do that?
|
|
|||
|
In single.php, find this:
PHP Code:
PHP Code:
__________________
Rick Beckman, Kingdom Geek & Thesis Support Ninja (Forums Moderator) [ Thesis Manual | Help, my posts don't show up! ] Amazon Wishlist | My custom.css Get Thesis! | Earn Cash as a DIY Affiliate! Last edited by kingdomgeek : 08-21-2008 at 12:05 AM. Reason: s/-/_ |
|
|||
|
Rick,
There is a small error in your suggested code. The class "post-tags" should be "post_tags." The post-tags class will not show errors, but the appearance will not be the same as the tags line. It is not defined in style.css, while post_tags is. The code: Code:
<p class="post-tags">Categorized in: <?php the_category(', '); ?></p>
Code:
<p class="post_tags">Categorized in: <?php the_category(', '); ?></p>
Thanks! |
|
|||
|
Good call, Mike! I'm still getting used to the keyboard on this laptop and apparently I'm not catching all the silly typos it's causing me!
__________________
Rick Beckman, Kingdom Geek & Thesis Support Ninja (Forums Moderator) [ Thesis Manual | Help, my posts don't show up! ] Amazon Wishlist | My custom.css Get Thesis! | Earn Cash as a DIY Affiliate! |
|
|||
|
Thank you Rick and Mike for you're solutions.
It works, however the category is only shown at the bottom of each single entry. I would like to see the category on top of each article, on a single page and on the homepage. URL: Linux op de desktop — Digiplace and AcidRip — Digiplace and I would like to see it in the line which say's "Geschreven door Jos op 21 augustus 2008 - 22:21" so that this line looks like: "Geschreven door Jos op 21 augustus 2008 - 22:21" in categorie: Desktop, Hardware |
|
|||
|
To add the category information to the top of posts, open /lib/functions/content_functions.php and find this:
Code:
get_the_time('F j, Y') . '</abbr>'; ?>
Code:
Categorized in <?php the_category(', '); ?>
__________________
Rick Beckman, Kingdom Geek & Thesis Support Ninja (Forums Moderator) [ Thesis Manual | Help, my posts don't show up! ] Amazon Wishlist | My custom.css Get Thesis! | Earn Cash as a DIY Affiliate! |
|
|||
|
Thx, you are amazing, great support! It worked. But it became somehow with a capital font. I guess a css thing? So I removed it for now and start up reading some more about css/php/html.
![]()
__________________
/Jos Herni - http://www.digiplace.nl |
|
|||
|
I must have done something wrong the first time, or the upgrade fixed something. It works like a charm now. Thank you very much!
Digiplace — Linux op de desktop
__________________
/Jos Herni - http://www.digiplace.nl |
|
|||
|
Any idea how to place the category name above the headline, like they do here? The Bygone Bureau — A Journal of Modern Thought
Also, how would I make the formatting of the category name look like this? Thanks. Mike |
|
|||
|
To clarify, I only want the category name to appear on the main page. When someone clicks on it they'll be directed to the category page, which already has a heading, so they don't need the label in the post anymore. Thanks again.
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|