• Hi, i would like to show cation only on single posts, because in categories i see somethink like this – [caption id="attachment_4018" align="alignleft" width="192" caption="Foto: Edgars Kuzmins"][/caption] Where i can add new if statement -if (is_single()) {…} ?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Try editing your theme’s category template file and replacing <?php the_excerpt();?> with <?php the_content();?>

    Thread Starter nomnieks

    (@nomnieks)

    i use this code in category template
    <?php echo limit_content($post->post_content, 30) ?>

    here is code in function.php

    function limit_content($str, $length) {
      $str = strip_tags($str);
      $str = explode(" ", $str);
      return implode(" " , array_slice($str, 0, $length));
    }
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How i can edit wp-caption script?’ is closed to new replies.