Forums

Category ID Issues after Upgrade to 2.8.5 (2 posts)

  1. cma01
    Member
    Posted 2 years ago #

    I have a theme that displays a unique header image for the archive page based on the category ID.

    This was all working until I upgraded to 2.8.5. Now some category archives work, but there are several that all display the same category ID.

    For category 4: <h2 class="pagetitle cat29"> <= wrong
    For category 6: <h2 class="pagetitle cat6"> <= wrong
    For category 29: <h2 class="pagetitle cat29"> <= correct
    For category 31: <h2 class="pagetitle cat31"> <= correct
    For category 8: <h2 class="pagetitle cat31"> <= wrong
    For category 1: <h2 class="pagetitle cat31"> <= wrong
    For category 5: <h2 class="pagetitle cat31"> <= wrong
    For category 7: <h2 class="pagetitle cat31"> <= wrong
    For category 30: <h2 class="pagetitle cat31"> <= wrong

    The code for the title is this:
    <h2 class="pagetitle cat<?php the_category_ID(); ?>"><span>Archive for the ‘<?php echo single_cat_title(); ?>’ Category</span></h2>

    Why would this change and how can I fix it?

  2. Are those posts in multiple categories?

Topic Closed

This topic has been closed to new replies.

About this Topic