How do I replace shortcode in wordpress

advertisements

I am new to WordPress. Now I am trying to create a plugin here Im using a static shortcode
[SRPMGT id=12345]
And this short code can be placed in any page. I want to replace this shortcode with html content
<div class="result"> Content to replace... </div>
Note : This Shortcode can be placed in any page.
Please somebody help me to solve this..
Thanks in Advance..


function add_shortcode( $tag, $func )

is the core of what you need to know.

So insert into your functions.php:

function srpmgt_shortcode() { return ' Content to replace... '; }

add_shortcode('SRPMGT_id=12345', 'srpmgt_shortcode');