Theme Support Forum

Support Forum for Free and Premium Themes. Premium Theme Forums are Private! Please log in first to see the Premium forums

Viewing 7 posts - 1 through 7 (of 7 total)

Add category and tag title to categoy / tag page

Home Forums Free Theme Support Zenon Lite Add category and tag title to categoy / tag page

  • #143436

    jerry

    When a blog reader clicks on a blog article’s category or tag, the category or tag page displays with the articles related to the category or tag. How do you display the category or tag at the top of the page ?

    #145002

    Towfiq I.

    administrator

    Open up category.php and add this:

    <h1><?php get_cat_name( $cat_id ) ?></h1>

    after this:

    <?php get_header(); ?>

    not doable for tag page.

    #145379

    jerry

    Hi – I added this to the category.php page – no luck :
    <br><br>
    <h2>Category =</h2><br><br><h2> <?php get_cat_name( $cat_id ) ?></h2>

    <br><br>

    http://danilew.biz/blog/category/travel/

    #145553

    Towfiq I.

    administrator

    replace this:

    <?php get_cat_name( $cat_id ) ?>

    with this:

    <?php echo get_cat_name() ?>

    #146114

    jerry

    Hi – I did the above now I get this message :

    Category =
    Warning: Missing argument 1 for get_cat_name(), called in /hermes/bosnaweb03a/b2079/sl.danilewb/public_html/blog/wp-content/themes/zenon-lite/category.php on line 3 and defined in /hermes/bosnaweb03a/b2079/sl.danilewb/public_html/blog/wp-includes/category.php on line 202

    #146362

    Towfiq I.

    administrator

    oops. looks like it should be this:

    <?php single_cat_title(); ?>

    #146558

    jerry

    Excellent – thank you !

You must be logged in to reply to this topic.