How register a custom shortcode for wordpress site?

Hello Friends!
If you want to create a own custom shortcode in your wordpress website, then don’t worry just use my code.

function my_function( $atts ) {
     return "My Name is = {$atts['content']}";
}
add_shortcode('myname', 'my_function');

For register you new shortcode ,just need to add this code in your themes function.php file
Your shortcode [myname content=”raghunath website freelancer”] is ready for use
Note:Change the content in short code during use this shortcode in your website.
Enjoy Raghunath Blog!

14 Replies to “How register a custom shortcode for wordpress site?”

  1. First off I would like to say fantastic blog! I had a quick question that I’d
    like to ask if you do not mind. I was curious to find out how you center yourself and clear your thoughts prior
    to writing. I have had trouble clearing my mind in getting my ideas out.
    I do enjoy writing but it just seems like the first 10 to
    15 minutes tend to be lost just trying to figure out
    how to begin. Any ideas or hints? Thank you!

  2. After I originally left a comment I seem to have clicked on the
    -Notify me when new comments are added- checkbox and now each
    time a comment is added I recieve 4 emails with the same comment.
    Is there a means you can remove me from that
    service? Thanks!

  3. I love what you guys are up too. This sort of clever work
    and coverage! Keep up the amazing works guys I’ve incorporated you guys
    to my blogroll.

  4. Excellent post. I was checking constantly this blog and I’m
    impressed! Very helpful information particularly the last
    part :) I care for such info much. I was seeking this certain information for a
    very long time. Thank you and good luck.

Leave a Reply

Your email address will not be published. Required fields are marked *