Dynatags is a WordPress plugin that lets you to create up to 10 short tags without writing a single PHP code row.
It can be download from WordPress Plugin Ditectory.
How great is to have the shorts tags (the ones like [aaa param="value"]) in WordPress to embed things or add features to a post?
Good! Now you can create your own short tags without writing a plugin. And if you are a PHP programmer you can write your code within a configuration page. This is what I call productivity!
Is really simple to use Dynatags. Lets go with an example. You want to define a short tags to embed an ad from Tradedoubler/AdSense/Zanox in some posts but want to have a way to control it from a centralized place. Not only: you need to change the ad whenever you need (to update it) without touching the posts.
- Choose a name for your short tags: let it be “onlinedate”
- Go to a post and add this in the body (dynatag name=”onlinedate”) with round paranthesis chenged with square ones
Now we try to use PHP code. First, our mission: print the user ip address within a post. It’s stupid, I know.
- Choose a name for your short tags: let it be “ip”
- Add the PHP code below in the code block
- Go to a post and add this in the body (dynatag name=”ip”) with round paranthesis chenged with square ones
The PHP code can looks like:
<?php echo “Your IP is: ” . $_SERVER['REMOTE_ADDR'];?>
It’s working? Look below:
More complicated: use the short tag parameters. We want to call the tag passing two parameter, like this:
(dynatag name=”ip” param1=”test 1″ param2=”test 2″)
the PHP code to use those parameter i like that one:
echo “Parameter 1 is: ” . $attrs['param1'];
echo “Parameter 2 is: ” . $attrs['param2'];
Flexible, isn’t it?
Help and support
I’m too lazy to update this page for new version, check this blog for the tag dynatags versions.