• Resolved mako2

    (@mako2)


    Hello

    I would like to change the placement and arrangement of the product tags

    I need to move them from here https://ibb.co/BtPnCZ7

    To here https://ibb.co/LnjRwH9

    How do I do that? I need the tags as a list. I dont want to change the layout when I update the theme or plugin.

    Thank you in advance for your help.

Viewing 6 replies - 1 through 6 (of 6 total)
  • To get part way there, try this custom css:

    .tagged_as {
      visibility: hidden;
    }
    .tagged_as:before {
      content: "Etiquetas:";
      visibility: visible;
    }
    .tagged_as a {
      margin-bottom: -26px;
      display: block;
      visibility: visible;
    }

    To move the tags to below the image would need a new product page template. That’s not trivial and PHP skills or a developer would be needed.

    Thread Starter mako2

    (@mako2)

    You are amazing! That is almost what I need. Now I need to place that under the photo and above the tabs. How do I do that?

    The categories and the tags come as one section. You can move the section with a snippet in functions.php of your child theme:

    remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_meta', 40 );
    add_action( 'woocommerce_after_single_product_summary', 'woocommerce_template_single_meta', 5 );

    Then tidy it up with:

    .product_meta {
      clear: both;
    }
    .sku_wrapper,
    .posted_id,
    .tagged_as {
      display: block;
    }
    .tagged_as {
      visibility: hidden;
      height: 120px;
    }
    .tagged_as:before {
      content: "Etiquetas:";
      visibility: visible;
    }
    .tagged_as a {
      margin-bottom: -26px;
      display: block;
      visibility: visible;
    }

    To move just the tags, you would need to make a new meta template.
    Copy
    wp-content/plugins/woocommerce/templates/single-product/meta.php
    to
    wp-content/themes/<your-child-theme-name>/woocommerce/single-product/meta.php
    and remove the tags line 36 from the copy of meta.php.

    Next, use the add_action() similar to above to insert a new function to print just the tags.

    That’s a bit more code than would normally be provided as a forum answer. PHP skills or a developer would be needed.

    Thread Starter mako2

    (@mako2)

    lorro (@lorro) you are amazing!!! thank you so much. One more question. If i do this, will I lose this customization every time I update my theme? Is there a way to do this without losing the customization? Thanks and be safe!

    You’ll need to make a child theme and put the edited template in the child theme using the directory path I gave, then the changes will be update-safe.

    laceyrod

    (@laceyrod)

    Automattic Happiness Engineer

    Hi @mako2

    I’m happy to hear you were able to get the assistance you needed. This thread has been inactive for a bit, so I’m going to mark it as Resolved now. Please feel free to open a new one if you have any further questions.

    Cheers!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Changing the placement of tags’ is closed to new replies.