• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Shortcodes: Custom Shortcode Name

Messages
2
Likes
1
Points
1
#1
This plugin is amazing. It would be great to be able to modify the shortcode name.

Example: from this [wbcr_snippet id="37"] to this [custom-shortcode-name]
  • Ability to modify the shortcode name.
  • Ability to remove "wbcr_php_snippet" from the shortcode name
 

alexkovalev

Program developer
Staff member
Messages
231
Likes
17
Points
18
#2
Hi,

This idea looks very interesting.

If it's not difficult for you. You can add a small case, how do you want to use this feature? Why is it bad to use the current shorcode names?

We will definitely think about this in new releases!

Thanks for your idea!

Best regards, Alex
 
Messages
2
Likes
1
Points
1
#3
Use Case Scenario:

Developer uses shortcodes and snippets in all client sites. Developer uses the same shortcodes for template type content.

Example:
Template type pages are just copied over to new sites. Like pages with site legal text: terms of use, privacy policy, cookie policy, etc... Developer uses shortcodes to automatically pull important site info into legal text.
- Site Title
- Site URL
- Site Admin Email
- anything really...

Issues with current shortcodes:
- The “Woody” shortcodes would be different on each site. The developer would have to make sure that each shortcode matches all of the shortcodes on each template page.

- The shortcodes would change everytime they are imported, created or re-created on a site.

- Woody shortcode names don’t provide any useful info to developers or front end users. If there is an error with the plugin, the php, or if the plugin is accidentally disabled... then the users on the front-end see a shortcode that doesn’t make any sense. A more functional driven development are shortcode names which provide some clear information as to what the shortcode is trying so display. For example, instead of shortcode named like this: [wbcr_snippet id="37"], it could be named like this [site-name]. Providing a name for the shortcode gives clear insight that the shortcode is probably there to provide the website’s name. So even if there the shortcode isn’t working, it still provides info to the user. It also provides the developer clear info.
 

Jenkler

New member
Messages
11
Likes
0
Points
1
#4
I just need a patch so I can set the shortcode id or something so I can access it the same way. The id thing is kinda pointless. We can take the title of the snippet and make it unique and have that as a key.

wbcr_snippet is kinda long but its not that important to change (feat wise). Is this something that could be fixed in the near future or is it a big backlog ;)