• Resolved Otenyano

    (@junrill)


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

    Anyone got an idea on how to link this on there category?

    thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • Not sure what you are asking so will throw this out there:

    echo '<p> category ' . '<a href="' . get_category_link( $category->cat_ID, 'post_tag' ) . '" title="' . sprintf( __( "View all posts in %s" ), $category->name ) . '" ' . '>' . $category->cat_name.'</a> has ' . $category->count . ' post(s). </p> ';
    Thread Starter Otenyano

    (@junrill)

    get_category_link();

    sheyt… thanks man.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘adding link get_the_category’ is closed to new replies.