• I am using the latest version of WordPress (5.5.3), I have setup a page using external json data, the json requires an ID to be sent.

    If i do this {website_address}/match-result/?id=XXXXXX it works great,

    My question is, is there a way for you to skip the /match-result/?id=XXXXXX and replace it with just match-result/XXXXXX

    I tried editing the htaccess file, but wordpress threw up a 404 error.

    Really appreciate any help.

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • I don’t really have much experience in the work you have already done – but just a thought :
    Does the page require that the id be passed using _GET ?
    Otherwise, perhaps you could pass the id as a hidden element variable in html?
    I’m just thinking out loud.

    Clearly if you would use a _POST that would help a lot!
    <input type=”hidden” name=”id” value=”XXXXXX” />

    Thread Starter chalkie1983uk

    (@chalkie1983uk)

    Hi There,

    I am able to pass the variable to the page, the url /match-result/?id=XXXXXX works great and produces the desired effect of the post, but all I want to do is remove the ?id= part of the url.

    so instead of /match-result/?id=XXXXXX it would look like this: /match-result/XXXXXX

    Kind regards,

    Adam

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Pass an ID from a URL’ is closed to new replies.