I have tried to build an url using a parameter, and it depends on the element the user clicks.
I have used the method add_query_arg( 'id', $id, '' )
, and the href value of the anchor looks ok, but when I click it, wp redirects me to the url example, but the url looks like example/?id=1. Is this the expected behaviour? I don't know why is writing the slash character before the args.