WordPress.org

Ready to get started?Download WordPress

Forums

how to enter a new line in Tagline (12 posts)

  1. lucianrosca
    Member
    Posted 4 years ago #

    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

  2. alchymyth
    Forum Moderator
    Posted 4 years ago #

    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.

  3. lucianrosca
    Member
    Posted 4 years ago #

    <?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

  4. alchymyth
    Forum Moderator
    Posted 4 years ago #

    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'));

  5. lucianrosca
    Member
    Posted 4 years ago #

    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

  6. batrachoid
    Member
    Posted 4 years ago #

    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>

  7. lucianrosca
    Member
    Posted 4 years ago #

    Batrachoid, That worked wonderfully. Thanks

  8. halfliferonin
    Member
    Posted 4 years ago #

    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:)

  9. alchymyth
    Forum Moderator
    Posted 4 years ago #

    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

  10. halfliferonin
    Member
    Posted 4 years ago #

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

  11. istudio818
    Member
    Posted 3 years ago #

    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!

  12. istudio818
    Member
    Posted 3 years ago #

    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!

Topic Closed

This topic has been closed to new replies.

About this Topic