• Resolved alacardfw

    (@alacardfw)


    Hello.

    I’m seeing that the products in my Title Page are WAY too big.

    I found this in the title.php file:

    the_title( '<h1 class="product_title entry-title">', '</h1>' );
    

    What do I need to change this too to make the product title smaller?

    Thanks!

Viewing 5 replies - 1 through 5 (of 5 total)
  • Are you able to add custom css to your wordpress theme? If so, you could add something like the following to your custom CSS file:

    h1.product_title {font-size: 20px;} // change 20px to desired size (example: 25px)

    Or you may need to add !important if it doesn’t override the current CSS:

    h1.product_title {font-size: 20px!important;}

    Otherwise, you could take the title.php file and upload it to your theme via FTP to override the template. See this link for how: https://docs.woocommerce.com/document/template-structure/#section-1

    Then change that line in title.php to this:

    the_title( '<h1 style="font-size:20px!important;" class="product_title entry-title">', '</h1>' ); // change font-size to desired size

    First option (changing CSS) is perhaps easier and you wouldn’t have to maintain template files – in my opinion the better option.

    Custom css can be entered at:
    Dashboard > Appearance > Customize > Additional CSS

    Thread Starter alacardfw

    (@alacardfw)

    Thanks for the help! Those worked perfectly.

    My next challenge is 3-fold:

    • Changing the size of the Table that the Product Title appears in. It is too short across and thus makes the last words of title description move into a 2nd line – and also puts a HUGE amount of white space between the two lines of text.
    • Making the word “Product” disappear from Header/Title Image area of every product I add, and replacing it with the actual product name.
    • Making the Product Name/Description in the WP Product Review Lite Plugin the same size (It’s too large as well)

    If anyone can help with that, I’d very much appreciate it.

    Thanks!

    • This reply was modified 7 years, 8 months ago by alacardfw.

    Can you explain what you mean by “Table that the Product Title appears in”? As far as I know it’s not a table, but is divs or sections. You can adjust the size of the main product image section to be less wide so that the product title has more room. However, you’ll need to adjust for every screen size as this will change depending on the device.

    If the title is too much space between lines, you can add this to the same h1.product_title tag I mentioned above:

    line-height: 20px; //change the amount to your desired number - changes space between text lines

    Not sure what you mean on your 3rd part, but perhaps a link to the page or a link to a screenshot that we can see what you’re referring to?

    I’m not familiar with the WP Product Review Lite plugin, but if you send a link of the site you are working on, maybe I can determine the CSS you need to change that. Either that, or you need to post on their support forum directly instead of on the Woocommerce one.

    jessepearson

    (@jessepearson)

    Automattic Happiness Engineer

    There hasn’t been any further responses here, so we are going to count this as resolved for now. It can be reopened or a new thread started, if needed.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Product Title Page’ is closed to new replies.