WordPress.org

Support

Support » How-To and Troubleshooting » how to enter a new line in Tagline

how to enter a new line in Tagline

  • lucianrosca
    Member

    @lucianrosca

    I have two sentences in Tagline: Who are you? What do you stand for?
    Currently the Tagline’s second line is: you stand for?
    How do I write the second sentence as a new line? If I use the “enter” key it doesn’t create a new line but it selects “Save Changes” on the General Settings page from the Dashboard. Using the space bar doesn’t help either.
    I’m using Oulipo by Mignolo as a template, the site is at carbrandimage.com
    Thanks for your help

Viewing 11 replies - 1 through 11 (of 11 total)
  • Michael
    Forum Moderator

    @alchymyth

    you can’t do this directly.

    alternative 1: is to write the ‘two-line-tagline’ directly into the respective position in header.php.
    alernative 2: put a few lines of php code tow break your tagline into two lines at a chosen character.

    assume you have this (typical) code to show the tagline in header.php:
    <?php bloginfo('description'); ?>

    alternative 1:
    change it to:
    Who are you?<br />What do you stand for?

    alternative 2:
    <?php echo str_replace('-','<br />',get_bloginfo('description')); ?>
    assuming that you enter your tagline as ‘Who are you? – What do you stand for?’ in the general settings.

    lucianrosca
    Member

    @lucianrosca

    <?php bloginfo(‘name’); ?> appears 7 times in header .php
    Do I need to replace all 7 with Who are you?
    What do you stand for?

    Or, in alternative 2: where do I place that line?

    Lucian Rosca

    Michael
    Forum Moderator

    @alchymyth

    do you have a link to your site – would be easier to point you to the right line.

    otherwise – you will probably find that ‘bloginfo(‘description‘);’ appers less often in header.php than ‘bloginfo(‘name’); ‘

    make a backup copy before editing theme files

    what you are looking for is probably the last ‘bloginfo(‘description‘);’ in the header.php –
    and alternative 2 would mean to replace
    bloginfo('description');
    with
    echo str_replace('-','<br />',get_bloginfo('description'));

    lucianrosca
    Member

    @lucianrosca

    Yes, you were right. It was my mistake, there was just one bloginfo(‘description’); in the header.php, I replaced it and did the change in the tag line and now looks the way I was planning.

    Now if I can get rid of that ‘Comments are closed.’ at the bottom of the page. If you have any idea please let me know.
    Thanks for your help

    batrachoid
    Member

    @batrachoid

    In the comments.php look for the line <p class="nocomments">Comments are closed.</p> and delete it or replace it with <p class="nocomments">&nbsp;</p>

    lucianrosca
    Member

    @lucianrosca

    Batrachoid, That worked wonderfully. Thanks

    halfliferonin
    Member

    @halfliferonin

    hi, i have problem with tagline too. i just tried the code from above and i didnt succed:( my problem is i want to add tagline on my theme who didnt support tagline. btw i did write my tagline in setting. should i change some css code for my tagline to place? here is my site please help me, i want to place some description under my site name on header. please help me.
    thanks in advance:)

    Michael
    Forum Moderator

    @alchymyth

    edit header.php and find:

    </div>
      <!--header in end -->
    </div><!--header end -->

    before that, add a new line:
    <div class="logo-description"><?php bloginfo('description'); ?></div>

    in style.css, add a new style:
    .logo-description { float:left; font-size: 150%; }
    if you need you can put more formatting into it.

    to make space for the text, you may need to change the height of #header.

    http://codex.wordpress.org/Function_Reference/bloginfo

    halfliferonin
    Member

    @halfliferonin

    thank you so much alchymyth:D i tried once and its done.

    alchymyth, thank you so much for your code to break tagline into 2 lines! It works perfectly for me.

    I now have another problem with the tagline: the second line is too long. Is there anyway that I could move entire tagline portion (both lines) to the left a bit?

    Here is my site

    Thank you so much!

    Also, is there any way that I could change the font style from italic to normal (at least for Chinese part)?

    Thanks lot in advance!

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘how to enter a new line in Tagline’ is closed to new replies.