• Resolved dataspot

    (@dataspot)


    I’m trying to get HTML to show up in users profile in their description section, or at least give them the option to have multiple paragraphs. I’ve looked at ticket 2272, but it doesn’t work on 2.0.3.

    Are there any other things I can try? To me it seems this should be given some (non-dangerous) HTML to work with (such as line breaks, paragraphs, anchors, and images).

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter dataspot

    (@dataspot)

    bump, ow.

    Thread Starter dataspot

    (@dataspot)

    LE BUMP.

    Thread Starter dataspot

    (@dataspot)

    asasdsadasd

    Thread Starter dataspot

    (@dataspot)

    I found a messy solution to allow some text formatting HTML. In author.php I did this:

    <?php
    $curauth->user_description = str_replace (“[p]”, “”, $curauth->user_description);
    $curauth->user_description = str_replace (“[/p]”, “”, $curauth->user_description);
    $curauth->user_description = str_replace (“[b]”, “<b>”, $curauth->user_description);
    $curauth->user_description = str_replace (“[/b]”, “</b>”, $curauth->user_description);
    $curauth->user_description = str_replace (“[u]”, “<u>”, $curauth->user_description);
    $curauth->user_description = str_replace (“[/u]”, “</u>”, $curauth->user_description);
    $curauth->user_description = str_replace (“[i]”, “<i>”, $curauth->user_description);
    $curauth->user_description = str_replace (“[/i]”, “</i>”, $curauth->user_description);
    echo $curauth->user_description; ?>

    AMSmith

    (@amsmith)

    I just found this “messy solution.”

    It’s true that tags in brackets (such as [b]) don’t get stripped when you save the “About Yourself” or “About the user” fields. So, perhaps this could work to add the paragraph markers back in but I’m having some problems:

    (1) Where in the author.php do you put the code? I tried putting it before the Loop and in the Loop. Didn’t work.

    (2) It seems that replacing [p] and [/p] with “”, isn’t going to help. Wouldn’t you replace them with <p> and </p>? (But that didn’t work either…)

    Here is the thread I posted on:

    http://wordpress.org/support/topic/111864?replies=5#post-538523

    Chris_K

    (@handysolo)

    You have a less messy solution back in your original thread.

    AMSmith

    (@amsmith)

    Since it wasn’t working for me at the time, I thought it would be acceptable to look at other options, while awaiting a possible reply on the code placement.

    If someone can address the questions I posted above, I would still appreciate an answer. It would help me continue to learn how WP works.

    FWIW, with the additional information, the other code works and is certainly more elegant. Try it!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘HTML in “About yourself” of profile, or at least line breaks’ is closed to new replies.