WordPress.org

Ready to get started?Download WordPress

Forums

Twitter Widget Pro
[resolved] How can I add Twitter Widget Pro manually to my theme? (6 posts)

  1. henningtillmann
    Member
    Posted 1 year ago #

    Hey,

    I'd like to add Twitter Widget Pro manually to my theme. How can I do that? Using "[twitter-widget ..." does only work on pages/articles, I need some PHP code, right?

    Thanks!

    http://wordpress.org/extend/plugins/twitter-widget-pro/

  2. Aaron D. Campbell
    Member
    Plugin Author

    Posted 1 year ago #

    Try this:

    <?php
    echo do_shortcode( '[twitter-widget ...]' );
    ?>
  3. henningtillmann
    Member
    Posted 1 year ago #

    Thanks a lot!

  4. richmartin
    Member
    Posted 1 year ago #

    Hi,

    Is there a way to add multiple twitter accounts to one site?

    Can I add the twitter username somewhere in there..

    <?php
    echo do_shortcode( '[twitter-widget ...]' );
    ?>

    to make it only display one account?

    Thank you!

  5. Joseph Hinson
    Member
    Posted 1 year ago #

    Hey richmartin,

    I didn't write this plugin or anything, but it pains me to see you hangin' there without an answer, this might help:

    Looking at the code, the shortcode takes the parameters:

    'before_widget'   => '',
    			'after_widget'    => '',
    			'before_title'    => '<h2>',
    			'after_title'     => '</h2>',
    			'title'           => '',
    			'errmsg'          => '',
    			'fetchTimeOut'    => '2',
    			'username'        => '',
    			'hidereplies'     => 'false',
    			'showretweets'    => 'true',
    			'hidefrom'        => 'false',
    			'showintents'     => 'true',
    			'showfollow'      => 'true',
    			'avatar'          => '',
    			'showXavisysLink' => 'false',
    			'targetBlank'     => 'false',
    			'items'           => 10,
    			'showts'          => 60 * 60 * 24,
    			'dateFormat'      => __( 'h:i:s A F d, Y', $this->_slug )

    So essentially, if you apply any of these in shortcode format it will work, see:

    echo do_shortcode('[twitter-widget username="jhinson" items="10"]'

    Play around with it a bit and see what you come up with.

    Hope that helps,

    Joseph

  6. Aaron D. Campbell
    Member
    Plugin Author

    Posted 1 year ago #

    That's all explained in the FAQ: http://wordpress.org/extend/plugins/twitter-widget-pro/faq/

    Look for "How exactly do you use the twitter-widget shortcode?"

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic