WordPress.org

Ready to get started?Download WordPress

Forums

DevBuddy Twitter Feed
[resolved] How to use the shortcode in 2 places & show different number of tweets? (3 posts)

  1. karenlea
    Member
    Posted 6 months ago #

    I'd like to show the feed on the home page (using the shortcode), and only see two tweets (as that is all space will allow), but I would like to show more in my sidebar of the news page.

    In Settings > Twitter Feed Settings I have set the number of tweets to show to 2, Thus is perfect for the home page but can I add some code to the short code to make the News page version show more tweets?

    [db_twitter_feed]

    https://wordpress.org/plugins/devbuddy-twitter-feed/

  2. EjiOsigwe
    Member
    Plugin Author

    Posted 6 months ago #

    Hey,

    The following get you the result you want:

    [db_twitter_feed count="10"]

    Of course it can be any number you want but bear in mind that upwards of 30 may begin to affect page load time.

    The settings in the Settings > Twitter are best used as defaults for your site, while using the code such as the example above can be used in cases where the defaults don't quite fit.
    So in your case you might set 10 in the settings page but use the code to set the count to 2 on the homepage because of space limitations.

    Let me know if it works.

  3. karenlea
    Member
    Posted 5 months ago #

    Works perfectly.

    Thanks

Reply

You must log in to post.

About this Plugin

About this Topic