TWO Parameters in a dynamic field URL?
-
I have a question about parameterized URLs. Can TWO parameters be included in a URL, with dynamic values that are taken from custom meta fields? The URL I’m working with is in a dynamic field and located within an iFrame. It pulls back an external page showing a Bible passage. The properties are the PASSAGE and the VERSION (e.g. passage=Psalm 139 and version=NIV), and these already exist as custom metafields on the custom post type. The syntax of the URL is like ‘https://www.biblegateway.com/passage/?search=psalm+139%3A1-4&version=NIV’ and, in this, you see the passage in the ‘search=’ value and the version in the ‘version=’ element.
The field format, as it currently is setup, is shown below. It only has one variable. It uses the text string (%s) based on the ‘passage’ metafield, and the version is hard-coded instead of dynamic.
BTW: If there is already a video that covers adding multiple dynamic parameters to a URL, then just point me at that. I don’t want to waste your time, but I’ve been spending hours trying to find this without success.
-
Hi, yeah you can have multiple parameters in an URL with an ampersand, like the Bible Gateway link you provided. The site just needs to have something built in for handling that.
These are the forums for free WordPress.com sites, so could you send a link to the WordPress site you need help with and let us know which parameters you’re trying to use?
Alternatively, you may have meant to post here:
https://wordpress.org/support/forums/You’ll just want to share more info too: what site you’re working with, what plugins, etc.
-
Hello Supernovia, and thanks for your response!
The WordPress site that I need help with is https://byheart.org and I’ve created a doc with screenshots, but am not sure how to send it to you.
I’m using JetEngine custom Post Type named “Recitation Videos” and the parameters are two Meta fields on the Recitation Video post type. The first is a text field labeled “Passage” (Name/ID = “passage”) and the second parameter is a “select” field labeled “Bible Version” (Name/ID = “bible-version”).
When I go to Templates > Theme Builder > Default Recitation Video Single > Edit with Elementor and Edit the Dynamic Field in which I display the Bible Gateway passage, the Field format currently reads:
https://www.biblegateway.com/passage/?search=%s&version=NIV
The “search=” parameter is dynamically populated with the Passage meta field value. It is the second parameter, the “version=” that I would also like to populate with dynamic content
I really appreciate your help with this and will gladly provide any more information if needed,
All the best!
Tom Griffin -
I found the article you guys have for submitting a document. The screenshots are here: https://byheart.org/wp-content/uploads/2020/08/TWO-Parameters-in-a-dynamic-field-URL.docx
-
https://byheart.org/ is not hosted with us on WordPress.com, but using the open source WordPress software at another host.
Please ask the WordPress.org community for advice instead. They provide support for the version of WordPress you’re using at https://wordpress.org/support/forums/
- The topic ‘TWO Parameters in a dynamic field URL?’ is closed to new replies.