/ Published in: PHP

Wordperss Follow with variable
In double quotes you have ability to embed variable
post content: [twitter username='VeronicaDjeneva']Follow me Fools[/twitter]
In double quotes you have ability to embed variable
post content: [twitter username='VeronicaDjeneva']Follow me Fools[/twitter]
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<?php /* Plugin Name: Twitter Shower Plugin URI: http://www.scoldy.com Discription: Simple shortcode Version: 1.0 Author: Ronnie Author URI: http://www.scoldy.com */ add_shortcode('twitter', function($atts,$content) { $atts = shortcode_atts( 'username' => 'VeronicaDjeneva', ),$atts ); return "<a href='http://twitter.com/$username'>$content</a>"; }); ?>
Comments
