Skip to main content
Removed noise from title
Link
Pieter Goosen
  • 55.4k
  • 23
  • 115
  • 209

Creating a shortcode based on users preferences? (A bit hard to word)

edited tags
Source Link
kaiser
  • 50.8k
  • 27
  • 150
  • 244

Background: CreatingCreating a dynamic shortcode based on user inputs. ThisThis shortcode should change the output of do_shortcodedo_shortcode based on the fields the user selects.

Example: OnOn a page, a user selects "Show me: (X) Skateboarding (X) Basketball ( ) Hockey"

"Show me: (X) Skateboarding (X) Basketball ( ) Hockey"

When they click submit, the shortcode to do this should show as:

[shortcode_name types="Skateboarding, Basketball"]

[shortcode_name types="Skateboarding, Basketball"]

....since and since Hockey wasntwasn't selected, Hockey wouldntwouldn't be included.

That's what I'm trying to accomplish, I'm just having a hard time locking down how to actually do it.

Does anyone have any pointers or ideas on how to accomplish this?

Thanks so very much!

Background: Creating a dynamic shortcode based on user inputs. This shortcode should change the output of do_shortcode based on the fields the user selects.

Example: On a page, a user selects "Show me: (X) Skateboarding (X) Basketball ( ) Hockey"

When they click submit, the shortcode to do this should show as:

[shortcode_name types="Skateboarding, Basketball"]

....since Hockey wasnt selected, Hockey wouldnt be included.

That's what I'm trying to accomplish, I'm just having a hard time locking down how to actually do it.

Does anyone have any pointers or ideas on how to accomplish this?

Thanks so very much!

Background: Creating a dynamic shortcode based on user inputs. This shortcode should change the output of do_shortcode based on the fields the user selects.

Example: On a page, a user selects

"Show me: (X) Skateboarding (X) Basketball ( ) Hockey"

When they click submit, the shortcode to do this should show as:

[shortcode_name types="Skateboarding, Basketball"]

and since Hockey wasn't selected, Hockey wouldn't be included.

That's what I'm trying to accomplish, I'm just having a hard time locking down how to actually do it.

Tweeted twitter.com/#!/StackWordPress/status/512027107988234240
Source Link

Creating a shortcode based on users preferences? (A bit hard to word)

Background: Creating a dynamic shortcode based on user inputs. This shortcode should change the output of do_shortcode based on the fields the user selects.

Example: On a page, a user selects "Show me: (X) Skateboarding (X) Basketball ( ) Hockey"

When they click submit, the shortcode to do this should show as:

[shortcode_name types="Skateboarding, Basketball"]

....since Hockey wasnt selected, Hockey wouldnt be included.

That's what I'm trying to accomplish, I'm just having a hard time locking down how to actually do it.

Does anyone have any pointers or ideas on how to accomplish this?

Thanks so very much!