Search code examples
csswoocommercecapitalize

Every word starts with a Capital in meta description


I have a problem with custom field I have added to products in a woocommerce environment. When I add a custom field "authors" with the value "Jan van der Lans". It will display like this: "Jan Van Der Lans".

Is there a way to stop it from capitalizing every word? I tried CSS text-transform:none.

.site-main ul.products li.product .product-meta {
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
    line-height: 20px;
    max-height: 40px;
    text-transform: none;
}

<div class="product-meta"><span class="product-meta-title">Auteur:</span> Jan Van Der Lans</div>



<ul class="products">

                    <li class="post-442 product type-product status-publish has-post-thumbnail product_brand-lans-prof-dr-j-m-van-der-jan product_cat-11-tm-20 product_cat-pdf shipping-taxable purchasable product-type-simple product-cat-11-tm-20 product-cat-pdf instock">

    <a href="http://www.elephantdevelopment.nl/KSGV/publicaties/2-18-volgelingen-van-de-goeroe/"><img width="500" height="500" src="http://www.elephantdevelopment.nl/KSGV/wp-content/uploads/2016/06/ksgv-2-18-500x500.jpg" class="attachment-shop_catalog size-shop_catalog wp-post-image" alt="ksgv-2-18" srcset="http://www.elephantdevelopment.nl/KSGV/wp-content/uploads/2016/06/ksgv-2-18-500x500.jpg 500w, http://www.elephantdevelopment.nl/KSGV/wp-content/uploads/2016/06/ksgv-2-18-150x150.jpg 150w, http://www.elephantdevelopment.nl/KSGV/wp-content/uploads/2016/06/ksgv-2-18-45x45.jpg 45w" sizes="(max-width: 500px) 100vw, 500px"><h3>2-18 Volgelingen van de goeroe</h3>

    <span class="price"><span class="amount">€8.50</span></span>
</a><div class="product-meta"><span class="product-meta-title">Auteur:</span> Jan Van Der Lans</div><a rel="nofollow" href="/KSGV/publicaties/?add-to-cart=442" data-quantity="1" data-product_id="442" data-product_sku="" class="button product_type_simple add_to_cart_button ajax_add_to_cart">In winkelmand</a>
</li>





                </ul>

Link to the test environment: http://www.elephantdevelopment.nl/KSGV/publicaties/

Thanks in advance,


Solution

  • It got it from the PHP code which was used to display the custom field. it was the function .ucwords (php.net/manual/en/function.ucwords.php). Thanks a lot for the help.