• Hi, I have set up this website (don’t laugh please!) using the theme Livetwit:

    https://www.heresthelove.net/

    It is a live Twitter feed that is searching for any tweets featuring the word ‘Hanson’ (for fans to track their current tour).

    However, the functionality of the site is that it only allows you to search for one search-term at a time – if you specify two terms, for example, then it will only bring up tweets that mention BOTH terms. I want it to bring up tweets that mention either of the terms – ideally there are about ten #hashtags that I would like the feed to follow.

    Has anybody managed this?? Help! I will be forever grateful! ??

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter aliceralph

    (@aliceralph)

    Also if it could also specify particular people to follow (for example the official Hanson twitter, the official Street Team twitter etc) and show ALL of their tweets as well, then that would be amazing.

    On search word, put “word1 OR word2”. This will show results for either word1 or word2.
    Now on the second case, you’re gonna have to edit the code a bit, and I don’t know how it’d turn out since I haven’t tested, but you can do the following:
    Open the index.php of your theme, and look for the line 26 to 28:

    <script type="text/javascript">
                $('#twitterSearch').liveTwitter('<?php echo $pt_twitvalue; ?>', {limit: 10, rate: 5000});
            </script>

    Now, change it for

    <script type="text/javascript">
                $('#twitterSearch').liveTwitter('<?php echo $pt_twitvalue; ?>', {limit: 10, rate: 5000});
                $('#twitterUserTimeline').liveTwitter('<?php echo "TwitterAccount"; ?>', {limit: 15, refresh: false, mode: 'user_timeline'});
            </script>

    “TwitterAccount” should be the one you want to display results from, without the hash. If it does work, add other lines with the other accounts you also want to follow.

    Thread Starter aliceralph

    (@aliceralph)

    Awesome thanks! The first bit (word1 OR word2) seems to be working great, although the second part not so much. I think maybe it is because in the theme settings it asks you to choose to stream one Twitter account OR to stream some search terms (I have selected search terms.

    The code looks like this:

    <?
    if ($pt_twittype == "SearchWord") { ?>
            <div id="twitterSearch" class="tweets "></div>
          <script type="text/javascript">
                $('#twitterSearch').liveTwitter('<?php echo $pt_twitvalue; ?>', {limit: 10, rate: 5000});
                $('#twitterUserTimeline').liveTwitter('<?php echo "hansonmusic"; ?>', {limit: 15, refresh: false, mode: 'user_timeline'});
            </script>
    
    <? } else { ?> 
    
             <div id="twitterUserTimeline" class="tweets "> </div>
                 <script type="text/javascript">
                    $('#twitterUserTimeline').liveTwitter('<?php echo $pt_twitvalue; ?>', {limit: 15, refresh: false, mode: 'user_timeline'});
                </script>
    
    <? } ?>

    Do you think this ‘else’ thing is causing it perhaps?

    Thank-you for your help RE: the other thing!

    I figured it would fail, but I guess we didn’t lose anything for trying.
    Anyway, I just looked up on the Twitter help, and what you should do is add to your search words the following:

    from:twitteraccount1

    If you pair it with the other search terms via OR, you’ll get all these results you want.

    PD: Oh and of course, remove the previous code modification you made, that won’t work.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Livetwit theme pulling multiple Twitter search terms??’ is closed to new replies.