• Resolved signale

    (@signale)


    Hi, I’ve looped through the Woo products and now need to style it just like regular products on the shop page or products in Related Products. It feels like there’s some template part responsible for the display as custom plugins use it and display their products styled as the standard product through all the related parts of the site.
    I found <Template> tag and it feels like that meant to be a solution or not?
    Thanks a lot for the reply!

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter signale

    (@signale)

    My apologies, resolved this one, though this template tag, would be great to grasp the idea, whenever you got time to answer, thanks!

    Hi @signale, glad you got this sorted! To clarify about the Template tag, it’s used to render/nest templates inside other tags. So you could create a template and then reuse it in several other templates, reducing the amount of markup you need to rewrite and making it easier to manage your templates. You can also pass variables to the nested template as shown in the docs linked above.

    By the way, you might want to try posting on our own Loops & Logic forum next time since it’s a bit more of an active community and there are people with a wide range of skillsets on there. Don’t hesitate to ask away if you have any other questions!

    Thread Starter signale

    (@signale)

    Oh, thanks, will use it in the future.

    You’re welcome ??

    I just realized I made a small mistake in my earlier comment and I don’t seem to be able to edit that post anymore. It should say that the template tag is “used to render/nest templates inside other templates.” Although I guess the language is flexible enough that you could probably also nest a template inside a tag attribute, but that’s not commonly how it’s used. You might find this forum thread to be an interesting discussion about the workflow possibilities that open up when you nest templates inside one another.

    Thread Starter signale

    (@signale)

    Oh, I did get that – like inside literal physical formal tags not like inside tag itself ?? Now I’m interested how it’s possible inside the tag like to mean through the attribute ?? As actually it’s something I was wondered, like to say a loop tag I need to wrap each item into this template. But I guess it’s absolutely not at that point yet. Although I feel like the developers’ logic level is totally capable on such trick, I wouldn’t be surprised at all if that will be implemented in future. I will check the thread you mentioned, thank you very much, I’m so happy this is alive ??

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Woocommerce Template for the product in the loop’ is closed to new replies.