Custom HTML template tags in Wordpress

I’m working with some custom widgets and plugins that would greatly benefit from using Angular or Vue.js that enable the writing of custom HTML tags/components.


I’m wondering how this would be considered in submission review as Envato requires W3C compliant code. They do however state in the submission requirements that “Cutting edge code is exempt” from this rule.

Any thoughts on this before I waste time on something that may be hard rejected?

Why do you exactly require new tags? I could also require sometimes a lot of new tags but I worked it differently around.

Have you thought about data-x attributes?

For example, you want a “my-custom-tag” like in your example, this one could be this:

<div data-type="my-custom-tag"></div>

To call it in CSS you can write it that way:

div[data-type="my-custom-tag"] {
// css comes here..

To perform actions on jQuery just do it that way

$("body").on("click", "[data-type=\"my-custom-tag\"]", function(eventCallback) {
// jquery/javascript actions on click come here..

This should still be valid for W3C Contents because you’re using a div and the attributes can be whatever you want. We’re talking about data attributes which are used like variables in JavaScript dynamically. Perform any actions with them.

This would be my way to create custom content. But… why not directly use the class attribute and set an unique class name for your tag? I don’t really understand the point why it must be a custom tag name.

Explain it better and I can help you better :blush:

Cheers, eliteCode