• It IS possible to use HTML in your taglines. I found this tidbit in a 3 year old post at EnglishMike.net using the PHP function html_entity_decode and the get_bloginfo. Repeat: You need to use get_bloginfo so the data is returned to be processed before it is output. It’s as simple as:

    echo html_entity_decode(get_bloginfo('description'));

    A very helpful tip, and one that should be in the WP forums. I only tested it using <br> in the description but I can’t see why it wouldn’t work for other uses.

Viewing 13 replies - 16 through 28 (of 28 total)
  • Thread Starter Getzel Rubashkin

    (@fardak)

    I will post if I come up with a better way.

    Incidentally, using strip_tags to remove the HTML tags has the advantage of being to allow certain tags. While you wouldn’t want that for an HTML title, it might be still be helpful. For example, if you wanted make part of the tagline a link to an ‘About Us’ page, but strip out the link while on that page without losing other formatting tags. you could do that with strip_tags, but not with str_replace.

    I appreciate, thank you!

    Sounds a little bit complicated. You have to do an if-statement to determine, if the current page is ‘About Us’ to not strip out the link on any other page, don’t you?

    str_replace is reasonable just for the substitution of <br /> tags in the bloginfo, I think. Because strip_tags(Just another<br />WordPress weblog) would result in “Just anotherWordPress weblog”.

    My string replace example actually replaced “-” with “<br />

    You can do it in either direction.

    Getzel, do you have an idea how to use a non-breaking space in the tagline?

    Thread Starter Getzel Rubashkin

    (@fardak)

    I’d have to test… why do you want to do that?

    That would be nice. I want to tie a dash to a word, so the dash comes along with this word into the next line. Realizing that would spare me using <br /> tags and str_replace.

    Thread Starter Getzel Rubashkin

    (@fardak)

    Not following… sounds like you are still going to need to break the line. How are you planning on doing that?

    Just through the width of the div container. ??

    (Lines get broken on normal spaces.)

    Thread Starter Getzel Rubashkin

    (@fardak)

    Not a very reliable way to do it – it may break differently on different screens, but I’ll let you know if I come up with a solution to that.

    In my case it would do the trick.

    However, using <br /> tags is evil, isn’t it? Are they actually valid?

    Because the WordPress help says:

    “WordPress is producing valid XHTML 1.0 which means that inserting multiple line breaks (BR tags) after a paragraph would not produce white space on the web page. The BR tags will be removed as invalid by the internal HTML correcting functions.”

    Thread Starter Getzel Rubashkin

    (@fardak)

    I may not be up on my evil, but I had never heard that. Cursory reading of your WP help sounds like they are talking about multiple line breaks as opposed to one. I may be wrong…

    edit: rereading the WP help you quoted, maybe it is referring to a break after a paragraph specifically.

    Well, I’m not sure about that, too. The german WP help is more clear on that, but it may be a mistranslation or translation inaccuracy.

Viewing 13 replies - 16 through 28 (of 28 total)
  • The topic ‘HTML in Taglines – POSSIBLE’ is closed to new replies.