Forums

php single_cat_title() in sidebar not working when posts are shown (1 post)

  1. design_dolphin
    Member
    Posted 4 years ago #

    Version: 2.5.0

    Used:

    <?php echo get_category_link($cat);?>

    To create a link such as:

    <a href="<?php echo get_category_link($cat);?>" title="title">link</a>

    The link is placed in the sidebar.
    This link works in categories and subcategories. However when the link is clicked from the sidebar while in a post it gives a 404 error.

    The url path shown with permalinks is:

    http://www.mydomain.com/category

    The path shown without permalinks and no rewrite rules is:

    http://www.mydomain.com/?cat=

    The posts are in categories and subcategories. This happen both with posts in categories and subcategories.

Topic Closed

This topic has been closed to new replies.

About this Topic