permalinks – How to add query string at the end of the all URL for Custom Post Type?

Question

I’m using WPForms in order to collect leads from my website. I have a “request a quote” form and inside this form I have a multiple choice field with my services that are dynamically added by WPForms dynamic choice feature.

So when user visits one of my service detail page and decides to fill out my form I want current service to be automatically populated on the form. I followed the instructions in the tutorial below:

https://wpforms.com/developers/how-to-enable-dynamic-field-population/

But here is the problem. I have more then 100 services. So it is hard to find all the links in all pages, menus, sidebars etc and add a query string like “?wpf111_1=text&wpf111_2=othertext” at the end. So I’m wondering if there is a way to create a function that finds all these links that belongs to my custom post type(service) for me and automatically adds the query string that I provide at the end of the permalink to get a URL like below?

https://example.com/service/some-service/?wpf111_1=text&wpf111_2=othertext

By the way I am using Premalink Manager Pro to manage permalinks.

Any help will be appriciated.

0
Eren Süleymanoğlu 3 months 2021-05-15T10:06:06-05:00 0 Answers 0 views 0

Leave an answer

Browse
Browse