• Resolved ancafe

    (@ancafe)


    Is it possible to get the twit IDs with a PHP function to display them with the shortcode of the official twitter plugin [tweet id = ‘xxxxx’]?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter ancafe

    (@ancafe)

    My solution:
    Duplicate debug template and change template.php to:

    <?php
    /**
     * Available variables passed from the caller script
     * - $aTweets  : the fetched tweet arrays.
     * - $aArgs	   : the passed arguments such as item count etc.
     * - $aOptions : the plugin options saved in the database.
     */
     ?>
        <?php
        foreach ($aTweets as $t){
            $id = $t['id'];        
            echo do_shortcode("[tweet id='".$id."']<br>");
            
        }
        ?>
    
    • This reply was modified 8 years ago by ancafe.
    Plugin Author miunosoft

    (@miunosoft)

    Hi,

    Interesting approach.

    Your method unfortunately did not work in my environment.

    v2.6.0 comes with a new template Twitter which utilizes the Twitter official design for tweets with oEmbed. You should try. You’ll like it.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Get ID in plaintext to shortcode [tweet id=’xxxx’]’ is closed to new replies.