Support » Developing with WordPress » The Restoration change the location of the category descriptions

  • Hello, I am using the Woocommerce Restoration theme,
    I want to change the location of the category description

    But I can’t do it from the theme files, the class is :

    class=”term-description”

    Can you help me?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Moderator bcworkz

    (@bcworkz)

    It might be able to be moved with CSS. We’d need a live link to the relevant page to give detailed advice (and information on where it should be moved to). What’s possible with CSS is often limited. Beyond CSS capabilities, you’d need to alter the HTML that’s output by altering templates or related code. For advice on that sort of change I recommend asking through the theme’s dedicated support channel.

    Thread Starter willsslliw

    (@willsslliw)

    I thank you unfortunately woocommerce did not answer me. I attach one of the pages of my site https://tropia.fr/categorie-produit/decoration/

    Thanks bcworkz

    Moderator bcworkz

    (@bcworkz)

    Where the description could be moved by CSS alone is pretty limited in your case because there are several ancestor elements to go through before reaching a common ancestor. Changing the order of immediate siblings is feasible, but not when we need to go through several ancestors. The actual HTML would need modification to move the description anywhere significant.

    A lot of WC content is output through action hooks. You might be able to remove the action callback for description from whatever hook it’s attached to and add it to one in a better position. If that’s not possible, you’d probably need to override the default template, creating one with the HTML structure you want.
    https://docs.woocommerce.com/document/template-structure/

    Thread Starter willsslliw

    (@willsslliw)

    I will try to do that, thank you

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