bonny / WordPress-Simple-Fields

WordPress plugin that extend Custom Fields to include textareas, WYSIWYG-editor, files, attachments, well basically anything
http://wordpress.org/extend/plugins/simple-fields/
88 stars 23 forks source link

Add shortcodes #27

Open bonny opened 11 years ago

bonny commented 11 years ago

Something like:

most basic: [simple_fields_value slug=my_text_field]

with options: [simple_fields_value slug=my_text_field numInset=0 post_id=341] though: security issue with getting values from any post_id?

It's easy to do with "simple" fields like textarea, but what about the Google Map extension for example? Option for "type of output" so different fields can have different outputs?

samface commented 11 years ago

Support for shortcodes would be really nice! A big +1 from me on this one. :)

bonny commented 11 years ago

it's pretty easy to do, so maybe for next update. however, can you give any example on when/how you would/want to use it? right in the content, or in widgets, or where?

samface commented 11 years ago

In content foremost, even if it would be nice to have support for it in widgets as well.

Imagine for example a contact page where we have the address info in the content. Imagine being able to add simple fields to the contact page where we put the address info and replace the address info in the content with shortcodes that refers to the added simple fields. The point of this is that we now have contact info that can be reused anywhere but only edited at one place. Neat, huh? :)

bonny commented 11 years ago

hm, I think I understand what you're looking for. sounds smart and useful!