Wordpress - How to get URL param to shortcode?

If I understand your question correctly, you want to be able to get the parameter from the url, add it to the shortcode so you can add the parameter to the content.

See if this works:

add_shortcode('name', 'get_name');

function get_name() {

   return $_GET['name'];

}

In the wordpress backend editor you would have something like:

Hello [name], Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum.

Tags:

Shortcode

Urls