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


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:

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?

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

Any help will be appriciated.

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

Leave an answer