Forums

simple line break (3 posts)

  1. dave-g-o
    Member
    Posted 2 years ago #

    Hi all,

    I have a simple question I am calling a title and category description which works fine thanks to some forum help, but I would like to put a further line break between the title / description as it currently appears like this:

    http://www.magic-photography.co.uk/?cat=14

    where the title just goes into the rest of the text. I have tried using nl2br; but can't get it to work. Here is the code:

    <?php
      if (is_category()) { single_cat_title(); nl2br; echo category_description(); }
      elseif (is_tag()) { ?>  posts tagged "<?php single_tag_title(); ?>" <? }
      elseif (is_day()) { the_time('F jS, Y'); }
      elseif (is_month()) { the_time('F, Y'); }
      elseif (is_year()) { the_time('Y'); }
      elseif (is_author()) { the_author(); }
    ?>

    Thanks in advance

  2. alchymyth
    The Sweeper
    Posted 2 years ago #

    try:

    if (is_category()) { single_cat_title(); echo '<br />'.category_description(); }
  3. dave-g-o
    Member
    Posted 2 years ago #

    great thanks

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags