• infarmu.org

    I created this template from scratch and have a strip title for all pages except the home page that is intended to be for a one-line title.
    Some of the sub-menu pages (under programs) have two lines (restricted by the css width of the fields for the sub-menu).
    When you traverse to the page for that sub-menu, the corresponding title reflects the same two lines.
    https://infarmu.org/food-for-thought-book-club/
    Is there a way to force the title to be on one line?

    The definition for the strip-title is as follows:
    <h2 class=”strip-title”>“><?php the_title(); ?></h2>

    I think I need to create a function to strip out new lines?

    Thanks for your help!

Viewing 1 replies (of 1 total)
  • Thread Starter talljena

    (@talljena)

    I forced the title to be on one line by making the width of the menu title wider. I would still like to know how to have the title be independent of line breaking by the menu.

    I found this code that might work but not sure how to put it into WP:

    $str = str_replace(“\n”, ”, $str);

    Thanks

Viewing 1 replies (of 1 total)
  • The topic ‘Change 2-line menu to 1-line Page Title’ is closed to new replies.