foggy, (edited )

Sorry everyone’s being so unhelpful.

To get the time, you’ll use a script tag (because that will feel familiar if you’re a noob, but ideally, you’ll have separate JavaScript files that are just referenced rather than having it embedded in your html 🤓). This will mean learning basic vanilla JavaScript. This is a great opportunity to expand a little bit of knowledge.

Ok I’m trying to insert html code snippets and it’s parsing the html lmao. Idk if I can show you… Hmmm. Let’s see. I’ll update this in a sec.

All the info you really need to accomplish this is on this page.

Just go into a “try it yourself” example, it’s all html, and a script tag with the JavaScript example of what you are… Trying yourself :)

Pay attention to the html elements ID tags and the script tags “getElementById” calls.

Now if you’re using Divi or Elementor or some other page builder on WordPress, their editor might be wonky with adding script tags. That’s when you’ll need to level up a tiny bit further. Basically, you’ll (probably download a plugin that allows you to explore the filesystem, but these are generally unsafe!) download filezilla, find out the WordPress DB user/pass, connect via SFTP in filezilla. Then you’ll navigate to your theme, find a JavaScript folder and add a file with this script innards in it. Then, you reference that filepath in your HTML instead of doing it in a script. (And we thought page builders were making our lives easy!)

It might sound like a lot. Ask ChatGPT or Bard for help, they’ll guide you through easy mode or hard mode here. I’m happy to elucidate, too :)

LukeSky,

Wow! I’ll try everything you’ve said! Thanks you very much!

nudnyekscentryk,
@nudnyekscentryk@szmer.info avatar

This is not doable in HTML

MrAlternateTape,

Things like that probably require some scripting. You can check if there are ready to go scripts that you can just copy, but most likely you’ll have to program something up yourself. Even if there are scripts to copy, without understanding what they actually do and how they will work with WordPress you will have a hard time using them.

If you are not proficient in HTML yet, you are probably not ready for this. You’ll need to learn some scripting, insert those scripts on the pages and for that you need a deeper understanding of how everything works.

Unfortunately this means there is no easy solution here, you’ll have to put in the work to search and learn how to do this or you decide you don’t need it after all.

LukeSky,

Thanks for tour answer :)

tsonfeir,
@tsonfeir@lemm.ee avatar

deleted_by_author

  • Loading...
  • xmunk,

    I am personally disappointed that you’re using lemmy when you could just learn UDP and stop commenting.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • asklemmy@lemmy.ml
  • kavyap
  • DreamBathrooms
  • modclub
  • tacticalgear
  • GTA5RPClips
  • magazineikmin
  • thenastyranch
  • Youngstown
  • InstantRegret
  • rosin
  • slotface
  • everett
  • mdbf
  • cubers
  • JUstTest
  • ngwrru68w68
  • normalnudes
  • cisconetworking
  • Durango
  • khanakhh
  • Leos
  • ethstaker
  • tester
  • anitta
  • osvaldo12
  • megavids
  • provamag3
  • lostlight
  • All magazines