ThemeShaper Forums » Thematic

[closed]

custom postheader

(4 posts)
  • Started 8 years ago by atelierelealbe
  • Latest reply from atelierelealbe
  • This topic is resolved
  1. I have in funtions.php this code:
    function my_postheader() {
    $postheader = thematic_postheader_posttitle();
    return $postheader;
    }
    add_filter('thematic_postheader', 'my_postheader' );

    I need to get also a nice div with all the categories attached to that post and also all the tags. I'm stucked, as get_the_category($post->ID) works only outside the custom loop. Any help, please?

    Posted 8 years ago #
  2. code for the categories list and the tags list is in the postfooter. you can take a look at it in library/extensions/content-extensions and copy what you need into your functions file.

    also wp_list_categories might help:

    http://codex.wordpress.org/Template_Tags/wp_list_categories

    Posted 8 years ago #
  3. I think i found a solution, dirty one:

    function formula_indexloop() {
    if (have_posts()) : while (have_posts()) : the_post(); ?>
    <div id="post-<?php the_ID() ?>" class="<?php thematic_post_class() ?>">
    <?php thematic_postheader();?>
    <div class="postmetadata">
    <span class="titlecategories">
    <?php the_category() ?>
    </span>
    <span class="titletags">
    <?php the_tags('

    • ', '
    • ', '
    '); ?>
    </span>
    </div>
    <div class="more">
    ">Open this formula
    </div>
    </div>
    <?php endwhile; else: ?>
    <h2>Upsss!</h2>
    <p>There's no formula yet to show!</p>
    <?php endif;
    wp_reset_query();
    }

    You can see it in action here.

    Posted 8 years ago #
  4. I've tried already wp_list_categories but i couldn't restrict its output to current post, all this inside the loop. Thanks anyway

    Posted 8 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.