Title: michaelwe's Replies | WordPress.org

---

# michaelwe

  [  ](https://wordpress.org/support/users/michaelwe/)

 *   [Profile](https://wordpress.org/support/users/michaelwe/)
 *   [Topics Started](https://wordpress.org/support/users/michaelwe/topics/)
 *   [Replies Created](https://wordpress.org/support/users/michaelwe/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/michaelwe/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/michaelwe/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/michaelwe/engagements/)
 *   [Favorites](https://wordpress.org/support/users/michaelwe/favorites/)

 Search replies:

## Forum Replies Created

Viewing 9 replies - 1 through 9 (of 9 total)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Fetch Tweets] How to cut off Search Title code?](https://wordpress.org/support/topic/how-to-cut-off-search-title-code/)
 *  Thread Starter [michaelwe](https://wordpress.org/support/users/michaelwe/)
 * (@michaelwe)
 * [12 years ago](https://wordpress.org/support/topic/how-to-cut-off-search-title-code/#post-4889985)
 * thank you very much, by the way I am very like Japan!
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Fetch Tweets] How to cut off Search Title code?](https://wordpress.org/support/topic/how-to-cut-off-search-title-code/)
 *  Thread Starter [michaelwe](https://wordpress.org/support/users/michaelwe/)
 * (@michaelwe)
 * [12 years ago](https://wordpress.org/support/topic/how-to-cut-off-search-title-code/#post-4889971)
 * awesome!
    works!
 * which type of tweets fetched with the code you write?
    mixed – includes both 
   popular and real time results in the response. recent – returns only the most
   recent results in the response. popular – return only the most popular results
   in the response.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Fetch Tweets] How to cut off Search Title code?](https://wordpress.org/support/topic/how-to-cut-off-search-title-code/)
 *  Thread Starter [michaelwe](https://wordpress.org/support/users/michaelwe/)
 * (@michaelwe)
 * [12 years ago](https://wordpress.org/support/topic/how-to-cut-off-search-title-code/#post-4889960)
 * I find it!
    single_post_title must be the xxx.aaa bbb
 * so
 * I replace the bbb with “”
 * and works!
 * can I replace more?
    do I just add line $_sPostTitle = str_replace( “ccc”, ”,
   $_sPostTitle ); $_sPostTitle = str_replace( “ddd”, ”, $_sPostTitle );
 * will they works?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Fetch Tweets] How to cut off Search Title code?](https://wordpress.org/support/topic/how-to-cut-off-search-title-code/)
 *  Thread Starter [michaelwe](https://wordpress.org/support/users/michaelwe/)
 * (@michaelwe)
 * [12 years ago](https://wordpress.org/support/topic/how-to-cut-off-search-title-code/#post-4889951)
 * yep,
    I have replace it
 * this one should be the whole title in <title></title>
    `<?php fetchTweets( array('
   q' => is_single() ? single_post_title( '', false ) : wp_title( '', false ), '
   lang' => 'en' ) ); ?>`
 * and this is what I do
 *     ```
       <?php
       	$_sPostTitle = is_single() ? single_post_title( '', false ) : wp_title( '', false );
       	$_sPostTitle = str_replace( ".aaa bbb - home", '', $_sPostTitle );
       	fetchTweets( array( 'q' => $_sPostTitle, 'lang' => 'en' ) );
       ?>
       ```
   
 * But the result is the same!
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Fetch Tweets] How to cut off Search Title code?](https://wordpress.org/support/topic/how-to-cut-off-search-title-code/)
 *  Thread Starter [michaelwe](https://wordpress.org/support/users/michaelwe/)
 * (@michaelwe)
 * [12 years ago](https://wordpress.org/support/topic/how-to-cut-off-search-title-code/#post-4889934)
 * not works…
 * can you cut the code before first dot?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Fetch Tweets] How can I use specific search keywords with post title?](https://wordpress.org/support/topic/how-can-i-use-specific-search-keywords-with-post-title/)
 *  Thread Starter [michaelwe](https://wordpress.org/support/users/michaelwe/)
 * (@michaelwe)
 * [12 years ago](https://wordpress.org/support/topic/how-can-i-use-specific-search-keywords-with-post-title/#post-4888956)
 * Great!!!!!!!!!!!
    It works. do you online on twitter? I want to follow you , 
   and we can chat
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Fetch Tweets] How can I use specific search keywords with post title?](https://wordpress.org/support/topic/how-can-i-use-specific-search-keywords-with-post-title/)
 *  Thread Starter [michaelwe](https://wordpress.org/support/users/michaelwe/)
 * (@michaelwe)
 * [12 years ago](https://wordpress.org/support/topic/how-can-i-use-specific-search-keywords-with-post-title/#post-4888943)
 * not works….
    Do I just put the code in sidebar template?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Fetch Tweets] How can I use specific search keywords with post title?](https://wordpress.org/support/topic/how-can-i-use-specific-search-keywords-with-post-title/)
 *  Thread Starter [michaelwe](https://wordpress.org/support/users/michaelwe/)
 * (@michaelwe)
 * [12 years ago](https://wordpress.org/support/topic/how-can-i-use-specific-search-keywords-with-post-title/#post-4888935)
 * So,it can be one widget code , and every post get fetch the different tweets!
 * make it auto!
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Fetch Tweets] How can I use specific search keywords with post title?](https://wordpress.org/support/topic/how-can-i-use-specific-search-keywords-with-post-title/)
 *  Thread Starter [michaelwe](https://wordpress.org/support/users/michaelwe/)
 * (@michaelwe)
 * [12 years ago](https://wordpress.org/support/topic/how-can-i-use-specific-search-keywords-with-post-title/#post-4888934)
 * Example:
 * post title is “sunday morning”
    then, the sidebar of tweets will fetch the “sunday
   morning” keywords search in twitter.
 * post title is “my night”
    then, the sidebar of tweets will fetch the “my night”
   keywords search in twitter.
 * so , the search query is changing with the post title.

Viewing 9 replies - 1 through 9 (of 9 total)