Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #798704

    Hi Kriesi,

    Currently, when one writes a description for a category (wp-admin > WC > Edit Category), any html or css is stripped from the description field.

    I see by viewing the source of a Woo Commerce product archive page that currently the description defaults to a paragraph inside H1 tags, such as

    <div id="av_product_description" class="avia-section main_color avia-section-large 
    avia-no-border-styling avia-full-stretch av-parallax-section 
    av-section-color-overlay-active avia-bg-style-parallax container_wrap fullsize" 
    data-section-bg-repeat="stretch" style='color:#dd3333;'><div class="av-parallax 
    avia-full-stretch" data-avia-parallax-ratio="0.3"><div class="av-parallax-inner 
    av-parallax-woo" style="background-image: url(https://domain/wp-content/uploads/image.png);
     main_color background-attachment: scroll; background-position: 50% 50%; 
    background-repeat: no-repeat;"></div></div><div class="av-section-color-overlay-wrap">
    <div class="av-section-color-overlay" style="opacity: 0.5; background-color: #ffffff; "></div>
    <div class="container"><main class="template-page content av-content-full alpha
    units"><h1><p>This is a description of this category. This is a description of this 
    category. This is a description of this category.</p>
    </h1></main></div></div></div>

    My question is: is there a way to (1) remove the <h1> and <p> markup, while (2) also allowing the description field in wp-admin > WC > Edit Category to accept new html or css markup without removing it upon saving? I would just like to this area to be more flexible by adding custom styles and layout.

    Thanks!

    • This topic was modified 7 years, 5 months ago by perfectword.
    #799326

    Hey perfectword,
    Perhaps this will work for you: https://wordpress.org/plugins/allow-html-in-category-descriptions/

    Best regards,
    Mike

    #799366

    I will give that a try and let you know. Thank you!

    In the meantime, can you tell me where / how to remove the <h1> and <p> markup that surrounds the category description (see my original post).

    Thanks again!

    #800559

    Hi perfectword,

    It might be hard to remove h1 from there, it could be easier just change styles for it like so:

    
    #av_product_description h1 { your styles here }
    

    Or the html for this is found in
    /wp-content/themes/enfold/config-woocommerce/config.php in avia_woocommerce_parallax_banner function.

    If you need further assistance please let us know.
    Best regards,
    Victoria

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