I'm trying to use Custom Field types to embed twetter using the Do_Shortcode() like this :

echo do_shortcode('[tweet https://twitter.com/wordpressdotcom/status/204557548249026561 ]');

And its not work with me after

<?php the_content(); ?>

In my theme.

Iam try search and found this post but not work with me .

How can embed tweet in my theme

  • Post the callback that handles the tweet shortcodes. – s_ha_dum Jun 29 '15 at 15:34



   *  Shortcode look like this.
   *  [tweet url="http://www.yourwebsitename.com"] Twitter [/tweet]

  add_shortcode ( "tweet" , "ease_button" );
  function ease_button( $atts, $content ) {  
    extract(shortcode_atts( array(
              "url"     => false,     
    ), $atts ));

    $url = ( $atts['url'] ) ? $atts['url'] : '#';    
    return sprintf( '<a href="%s"> %s </a>',$url, $content );
  • where can i add this url https://twitter.com/wordpressdotcom/status/204557548249026561i dont need show link of tweet, i need to show tweet content – Android-wd Jun 29 '15 at 19:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.