• Hi there,

    since the title of my site is a bit long and the title’s text is big, it gets rendered in two rows on mobile, which doesn’t look cool.

    [example]
    ________________________________
    YOU ARE COOL

    becomes

    YOU
    ARE COOL

    ________________________________

    I suppose I should tinker with the CSS, but sadly I don’t know which part I have to edit in order to change the size of the font used in the title.

    I will appreciate any advice ??

Viewing 5 replies - 1 through 5 (of 5 total)
  • Are you using a child theme? (Recommended!)

    The front page content output is controlled by /template-parts/page/content-front-page.php on line 33.

    You could either use an inline style or define a new class and stick it into your style.css (child theme!).

    You could also just hard code the title but that’s not really recommended…

    Thread Starter cresta

    (@cresta)

    hi, thanks for your reply ??
    I tried using a child theme, but for some reason the end results is different than using the main theme; I probably did something wrong -you may guess I am not a programmer- so I’m sticking with the main theme.

    I will take a look into the page you mentioned, but I am unfamiliar with both “inline style” or “new class” ??

    Thread Starter cresta

    (@cresta)

    on a second thought, I just tried to activate the child theme again (I hadn’t tried yet after the update) and now it works. I suppose the problem was then not entirely on my side.

    So, now that the child theme works, is the procedure different?

    Now that you are using a child theme, you can be assured that your customizations won’t be overwritten when you update the (parent) theme.

    Here are the steps to use an inline style to fix this:

    1. Make a copy of /template-parts/page/content-front-page.php
    2. In the child theme folder, create folders /template-parts/page/
      and paste in your copy of content-front-page.php
    3. Look for the line: <php the_title( '<h2 class="entry-title">', '</h2>' ); ?> and change the style to suit yourself
    4. Example: <?php the_title( '<h2 class="entry-title" style="font-size:8px;">', '</h2>' ); ?>

    I can’t really counsel you on the CSS… too complicated. But suffice to say that the example above is a hack, rather than an elegant solution. You might as well just skip the php and code it: <h2 style={whatever you need}>YOU ARE COOL</h2>

    That should do guide you enough to open a new thread… Changing Style of Page Title for Responsive Site

    Thread Starter cresta

    (@cresta)

    wow thanks a lot!!!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘How to modify home page’s title text?’ is closed to new replies.