WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Code for Category Links (5 posts)

  1. sam_m
    Member
    Posted 6 years ago #

    Can someone please tell me what the code is to make some category titles on my page (which are blocks) into links so that when the user clicks on the title for a category block, it takes you to the full category listing of posts.

    Thx for any help.

  2. moshu
    Member
    Posted 6 years ago #

    Why the usual Template_Tags won't work for you?
    Template_Tags#Category_tags
    hint: wp_list_categories

  3. sam_m
    Member
    Posted 6 years ago #

    Hi Moshu.. thx for your reply .. What I have is a theme that displays category blocks. It is this line in the catgory-blocks.php (from the includes folder of the theme) I wish to change :

    // Show the post and its contents ?>
    <div class="post <?php echo $odd_category; ?>">
    <h2 class="section-header"><?php echo $c_name; ?></h2>

    Where I would like the $c_name to be a link instead of just the usual title displayed above a block.

    How can I do this? Using template_tags?

    Thx for your help

  4. moshu
    Member
    Posted 6 years ago #

    Without knowing which teme are we talking about (and a link to it) it is useless to ask questions related to specific code.

  5. sam_m
    Member
    Posted 6 years ago #

    Thx for your help I have found a way to do it.

Topic Closed

This topic has been closed to new replies.

About this Topic