What I am trying to do right now is really simple. I want to send a parameter through the URL and then display it on a WordPress page. This is what I am currently doing:
The URL I am putting in is www.domain.com/signin_page?message=yo
The shortcode I added to my functions.php file is:
function write_login_message( $atts) {
return "Message: " . $_GET['message'];
};
add_shortcode( 'write_message', 'write_login_message' );
The result is "Message: ". Also, I get a notice: Undefined index: message in [...]
. I tried something I found in a discussion (making a plugin that sets a query variable) but that didn't work and now I'm stuck. I'd appreciate any help.
UPDATE: $_GET['message'] works on my production server. It isn't working in my test/sandbox server (they are basically the same thing though). This narrows it down, but I am still not certain what the cause is. I can at least move on knowing that I can get it to work on my production server though.