Support » Plugin: Byline » Showing the descriptions

  • Resolved delawaresmith


    I added this to my single.php, but then it shows all author and descriptions on all pages. Same issue as pwocken.

    It’s a test site, but you can see it live here –

    <?php //old code here;
           //more old code ();
           //last line of old code;
           //You can add a comment here, to remind you why there is new code below
           $terms = get_terms("byline");
              $count = count($terms);
              if ( $count > 0 ){
                 echo "
                    foreach ( $terms as $term ) {
                         echo "<h6>About " . $term->name . "</h6>";
                         echo "<p>" . $term->description . "</p>";
                  echo "</ul>

    [Moderator Note: Please post code & markup between backticks or use the code button. Your posted code may now have been permanently damaged by the forum’s parser.]

Viewing 1 replies (of 1 total)
  • Plugin Author mattdu


    OK, this post revealed a flaw in my previous code.

    Replace this line:
    $terms = get_terms("byline");

    With this line:
    $terms = get_the_terms($post->ID, 'byline');

Viewing 1 replies (of 1 total)
  • The topic ‘Showing the descriptions’ is closed to new replies.