I edit a page in frontend using a cred form I made. When I save the page, I have it set so it redirects to the original page. But it is adding ?cred_referrer_form_id=1005 to the end of every url when it takes me back to the original page. So if I edit
hidden link
Then I click save. It redirects me to:
hidden link
It never used to do this until the past 4 or 5 months. How do I remove this from the url?
The way CRED edit forms are handled was changed significantly some months ago, you are right.
The URL referrer attribute you see added is part of the new workflow to enable passing messages to the edited post ("Post updated!" etc.), and is added whether there are any messages to pass or not.
There isn't any way to disable it, but it is only shown after submitting the edit form, not if your users are just visiting the page.
The class="edit" tag triggers jquery script to open the link in an off canvas menu. But it won't work now because of that extra stuff at the end of the url: ?cred_referrer_form_id=1005
So what is the solution for this so my script works?
I saw the video and followed your link, but I'd like to see how you have it set up if that's okay, so, yes, let me set up a private reply and you can give me credentials to check out your site.
Thanks for that. I can see the issue now as you describe it.
I looked at our code to see if there might be a way to suppress adding the cred_referrer_form_id URL parameter but couldn't see a way to do that, so I've asked colleagues if it is possible.
In the meantime, I looked at footer-code.php and you only enqueue the pageslide library and instantiate it when the page URI does not include "cred".
Why do you do that?
Because of the URL parameter 'cred_referrer_form_id' obviously does include "cred" you don't set up pageslide.
I think I was trying to stop the sidebar from working at all when someone was editing a page... but you're right... that is what is stopping it from working once it saves the page. Do you know of different code I could use to stop that script from loading when in edit page mode?
I'd still like to see the ?credurl disappear though once you save a page. We do a lot of copying and pasting of urls and now it makes it more time consuming to have to keep deleting that extra text at the end that cred adds when you save.
You just need to be more specific about when you don't want the page slider loaded, i.e. change strpos($_SERVER['REQUEST_URI'], 'cred') to strpos($_SERVER['REQUEST_URI'], 'cred-edit-form').
I checked with the developers and it is not possible to prevent the CRED referrer URL parameter being added.
You could add a link to the current page which excluded any URL parameters so that you could right-click it and copy that.
The wpv-post-url shortcode will output just the URL without any parameters, for example.