Passing website content to URL parameter on WordPress

Can someone enlighten me how this is done?

On Image 1 you see a table like layout to inform which course is taking place when and at what time (it’s from a school website). At the end it has a link with “schrijf nu in” which means “enlist now”.

That links sends you to a contact form seen in Image 2. What I can’t figure out is how they manage to pre-populate the fields according to the course you selected.

I understand this is passed through the URL, but I highly doubt they hard-coded the keys and values in the link tag like this:

<a href="">Click me</a>

It must work with some kind of variable right? Because they can never know how many classes they will be having at a certain moment?

I’m trying to build something similar on WordPress where I create a custom post type for the different courses and classes and then display a loop on the frontpage to recreate the table like layout seen in “image 1”.

But I’m stuck with the “enlist now” button that links to the contact form.

Any help is very much appreciated.

Read more here: Passing website content to URL parameter on WordPress

Leave a Reply

Your email address will not be published. Required fields are marked *