Support » Plugin: Kebo Twitter Feed » custom Templates problem

  • Hi Peter,

    like I mentioned in an older post, there is a bug in /inc/widget.php and in /inc/shortcode.php. In both files you implement the template parts like this:

    get_template_part( 'views/kebo-twitter-list' ); (e.g. widget.php, line 140)

    Doing so means, that some variables are not passed / are empty and my custom template always returns “Sorry, no tweets found”. Please change the code to:

    require(locate_template('views/kebo-twitter-list.php'));

    Thanks in advance,
    Roman

Viewing 1 replies (of 1 total)
  • in kebo-twitter-list.php you should use this code :

    <?php $tweets = kebo_twitter_get_tweets(); ?>

    <?php $i = 0; ?>

    <?php if ( isset( $tweets->{0}->created_at ) ) : ?>

    <?php foreach ($tweets as $tweet) : ?>

    <?php echo $tweet->text; ?>

    <?php if (++$i == 10) break; ?>

    <?php endforeach; ?>

    <?php else : ?>

    <p>Sorry, the Tweet data is not in the expected format.</p>

    <?php endif; ?>

Viewing 1 replies (of 1 total)
  • The topic ‘custom Templates problem’ is closed to new replies.