• Resolved JohnFSklavounos

    (@johnfsklavounos)


    Hello,

    I’m forced to use array params with plug-in wpDataTables and while it’s working fine for the grid, I’m not able to get the parameter values to display on the page. I’ve tried a couple of ways to no avail. I’ve also tried with single and double quotes…

    Any suggestions? What am I doing wrong?

    This shortcode:
    [ifurlparam param="wdt_column_filter"]Filtered for: [urlparam param="wdt_column_filter%5BSubmittedByName%5D"][/ifurlparam]

    Results in this output:

    Leads filtered for:

    This shortcode:
    [ifurlparam param="wdt_column_filter"]Filtered for: [urlparam param="wdt_column_filter[SubmittedByName]"][/ifurlparam]

    Results in this output:

    Leads filtered for: “]

    Thanks!
    John

    https://wordpress.org/plugins/url-params/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Jeremy B. Shapiro

    (@jeremyshapiro)

    John, WordPress isn’t going to like you putting shortcode style brackets inside of the quotes as it’ll try and process [SubmitedByName] as a shortcode which it isn’t. Unfortunately, I don’t believe that you’ll be able to work with array params the way you’re hoping! 🙁

    John, did you ever find a work-around for displaying array parameters with the plug-in wpDataTables? I am trying to do the exact same thing and running into the same problems you were having. Any help would be appreciated.

    Thread Starter JohnFSklavounos

    (@johnfsklavounos)

    Hi rmorats,

    My solution was to replicate the array params I needed as their own param. The array had an ID and a name (amongst other data) I needed to access, so I coded them into their own individual params. This meant there was a replication of data in the string, but this was acceptable for our purposes.

    So I ended up with:

    [ifurlparam param=”pSubmittedByName”]Filtered for: [urlparam param=”pSubmittedByName”][/ifurlparam]

    I hope it helps!

    Best,
    John

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Trouble accessing Array Params’ is closed to new replies.