How do I pass variables into short-code enabled Post Snippets in WordPress 3.0?

I am using a plugin called Post Snippets.

According to the documentation, it can substitute variables, such as {url} within the snippets.

http://wordpress.org/extend/plugins/post-snippets/

I am unclear how to assign values from within a specific post to a variable.

I tried using exec-PHP, and used the following:

[exec]url = "domain.com";[/exec]

But the snippet registered no value for {url}.

How can I assign, from within a post, the value to a variable so that I can use it as described?

1 Answer
1

The Variables in Post Snippets (WordPress Plugin) is a comma seperated value. When you use the snippet-insert button in the post/page editor, you can set those.

An example of this is given on the homepage of the plugin, there is even a screenshot demonstrating that. Please read the documentation first.

Those Post Snippet Variables are totally unrelated to PHP variables. I think that’s just the thing you missed. You were looking in the wrong direction.

Leave a Comment