Skip to content

Instantly share code, notes, and snippets.

@wplit
Created August 20, 2019 06:58
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wplit/7861b18ef34ffd955b43ddcacc9ef6e8 to your computer and use it in GitHub Desktop.
Save wplit/7861b18ef34ffd955b43ddcacc9ef6e8 to your computer and use it in GitHub Desktop.
remove IDs from repeater component in Oxygen (to remove Lighthouse Error)
jQuery(".oxy-dynamic-list").find("*").removeAttr('id');
@wpsumo
Copy link

wpsumo commented Nov 7, 2019

I do hope there is some way Oxygen can build an option to disable all ID's on the front end. Or at least turn them into classes if they need to be there. Would solve all these problems in one go.

Yeah, let's see what they figure out here since we run into the same issue over and over again. Would be great to move over to classes let user utilize ID for other purposes such as jump/anchor links.

Thanks, I'll give it a run later on!

It's not possible to do this in php to not even render specific block ID's in the frontend. Thinking about this being more suitable for performance than manipulate with jQuery. If possible.

Many workarounds in inline js now, think I will be about time to enqueue a static file so be can utilize caching.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment