• Resolved xfatpanda

    (@xfatpanda)


    Hi,
    When I try to use the following scripts to show categories’s images, I don’t know why it only show the latest updated category’s image.

    <?php
    foreach((get_the_category()) as $category) {
    echo ‘<img src=”https://example.com/images/&#8217; . $category->cat_ID . ‘.jpg” alt=”‘ . $category->cat_name . ‘” />’;
    }
    ?>

    Could anyone give me some idea, please?
    Thank you.

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘only one category image shows (2.6.5)’ is closed to new replies.