Note that there are some explanatory texts on larger screens.

plurals
  1. POTwitter API 1.1 to display latest tweets
    primarykey
    data
    text
    <p>I was using the following code to get latest tweets of my account to my wordpress website. As soon as twitter launched its new API 1.1, it all broke completely. How to proceed.</p> <pre><code>&lt;?php // Get RSS Feed(s) include_once( ABSPATH . WPINC . '/feed.php' ); // Get a SimplePie feed object from the specified feed source. $rss = fetch_feed( 'https://api.twitter.com/1/statuses/user_timeline.rss?screen_name='.$cvt_twitter ); if ( ! is_wp_error( $rss ) ) : // Checks that the object is created correctly // Figure out how many total items there are, but limit it to 5. $maxitems = $rss-&gt;get_item_quantity( 5 ); // Build an array of all the items, starting with element 0 (first element). $rss_items = $rss-&gt;get_items( 0, $maxitems ); endif; ?&gt; &lt;ul style="list-style:none;"&gt; &lt;?php if ( $maxitems == 0 ) : ?&gt; &lt;li&gt;&lt;?php _e( 'No items', 'my-text-domain' ); ?&gt;&lt;/li&gt; &lt;?php else : ?&gt; &lt;?php // Loop through each feed item and display each item as a hyperlink. foreach ( $rss_items as $item ) : ?&gt; &lt;li&gt; &lt;div class="row"&gt; &lt;div class="span2"&gt; &lt;a class="thumb" href="&lt;?php echo esc_url( $item-&gt;get_permalink() ); ?&gt;" target="_blank"&gt; &lt;img width="100" height="auto" src="&lt;?=$cvt_logo?&gt;"&gt; &lt;/a&gt; &lt;/div&gt; &lt;div class="span9"&gt; &lt;a href="&lt;?php echo esc_url( $item-&gt;get_permalink() ); ?&gt;" title="&lt;?php printf( __( 'Posted %s', 'my-text-domain' ), $item-&gt;get_date('j F Y | g:i a') ); ?&gt;" target="_blank"&gt; &lt;?php $string = esc_html( $item-&gt;get_title() ); $word = substr($string, 0, strpos($string, ':')+1); echo str_replace($word, "", $string); ?&gt; &lt;/a&gt; &lt;/div&gt;&lt;/div&gt; &lt;/li&gt; &lt;?php endforeach; endif; ?&gt; &lt;/ul&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload