Skip to:
Content
Pages
Categories
Search
Top
Bottom

How can I break the H1 headliine?

  • @andiganter

    Participant

    The h1 topic headings in bbpress have the disadvantage that, instead of wrapping to the next line when they are very long, they are squeezed together on the same line (which often happens on mobile devices in particular). What solutions are there for this? All CSS measures have been tried so far without success.

    You can reproduce this issue when you go to to this page >> in mobile view.

    Thank you so much 🙂

    Andi

Viewing 4 replies - 1 through 4 (of 4 total)
  • @robin-w

    Moderator

    The link only works for logged in users, but if I have understood the problem, then if you have FTP capability :

    find
    wp-content/plugins/bbpress/templates/default/bbpress/single-topic.php

    transfer this to your pc and edit

    line 21 contains the h1 tag, so you can amend this to what you want

    and save

    create a directory on your theme called ‘bbpress’
    ie wp-content/themes/%your-theme-name%/bbpress

    where %your-theme-name% is the name of your theme

    Then transfer the file you saved above and put in in the directory called bbpress that you created above, so you end up with
    wp-content/themes/%your-theme-name%/bbpress/single-topic.php

    bbPress will now use this template instead of the original

    @andiganter

    Participant

    Thank you, but there is no existing file named single-topic.php in the folder (just content-single-topic.php, but that does not contain any “h1” tag).

    @andiganter

    Participant

    After extensive testing and numerous attempts, I finally found the solution (thanks to ChatGPT). I would like to post it here because other users may encounter the same problem and appreciate a quick solution, and so that the effort is at least worthwhile for others. Here is the CSS code, which simply needs to be inserted at the bottom of the Customizer under “Custom CSS”:

    .entry-title {
      white-space: normal !important;
      word-break: break-word !important;
      overflow-wrap: break-word !important;
      hyphens: auto !important;
      line-height: 1.2 !important;
      max-width: 100% !important;
      text-align: center !important;
    }

    @robin-w

    Moderator

    thanks, apologies for the wrong route – after a further check, the title is given by the theme, not bbpress.

    but thanks for a solution

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.
Skip to toolbar