Viewing 1 replies (of 1 total)
  • <?php
    $args=array(
      'orderby' => 'name',
      'order' => 'ASC'
      );
    $categories=get_categories($args);
      foreach($categories as $category) {
        echo '<p>Category: <a href="' . get_category_link( $category->term_id ) . '" title="' . sprintf( __( "View all posts in %s" ), $category->name ) . '" ' . '>' . $category->name.'</a> </p> ';
        echo '<p> Description:'. $category->description . '</p>';
        echo '<p> Post Count: '. $category->count . '</p>';  }
    ?>

    Here in a href just remove this get_category_link( $category->term_id ) and put your link.

Viewing 1 replies (of 1 total)
  • The topic ‘How to add an external link into my categories’ is closed to new replies.