• Resolved p-rposters

    (@p-rposters)


    Hi Ben,

    I’m trying to get line breaks in my author bio. Other than 1 reputable plugin that I’ve found (that doesn’t seem to work for me) I read that adding this to my functions.php file should work:

    $bio = $custom[“_staff_member_bio”][0];
    if ($bio){ echo ‘Bio:<div>’ . wpautop( $bio ) . ‘</div>’; }

    So, should I make a copy of my functions.php file, add this code, then upload it to the child theme folder?

    Or is there another work around?

    Thanks again…

Viewing 1 replies (of 1 total)
  • Thread Starter p-rposters

    (@p-rposters)

    Ok – for those of you looking to accomplish line breaks in your author bio, I found this solution:

    Open the Mission News Child Theme by going to:

    Appearance -> Editor -> Select theme to edit: (upper right) -> Mission News Child -> Theme Functions (functions.php)

    Add this “filter”:

    <?php
    function new_excerpt_more() {
    return ”;

    }
    add_filter(‘the_content_more_link’, ‘new_excerpt_more’, 99);

    That worked for me. I simply used a <br> tag in my user description found in Users -> Your Profile -> About Yourself -> Biographical Info.

    This way I don’t have just a “wall of text” in my bio area.

Viewing 1 replies (of 1 total)
  • The topic ‘functions.php in child theme?’ is closed to new replies.