Tagged: ,

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • #15769

    Wondering if anyone knows if there is a variable for a twitter username? e.g. $twitter_username

    I am trying to pull the value into a simple script with the following method but the value isn’t correct.

    <a id="twittericon" target="_blank" href="http://twitter.com/<?php echo avia_get_option('twitter'); ?>">Twitter User</a>

    I think with the Choices theme the entire URL is used? But can’t figure out how to break it out so I can use it in other places and not add an extra option to the GUI e.g. $username = avia_get_option(‘twitter’);

    Thanks for any input!



    Following code should work:

    $icons = avia_get_option('social_icons');
    if (!empty($icons))
    foreach ($icons as $icon) {
    if( $icon['social_icon'] == 'twitter')
    $link = $icon['social_icon_link'];
    $linkparts = parse_url($link);
    $username = substr($linkparts['path'],1);

    if (!empty($username))
    echo $username;


    Thanks so much! This worked perfectly Dude.

    I’ve used this to build a scrolling twitter feed in the banner text area of the theme. http://icrf.bunt.ca/

    It is by no means as elegant as the theme or existing options, merely fulfills a request. I’ve shared the commented code here: http://icrf.bunt.ca/twitter3.zip.

    Since I develop child themes, the function file in the child theme uses the avia_frontend_js function to register the jquery.cycle.all.js plugin (and echo the settings).

    I am wondering if this is something that may be added as a feature request? The ability to show Twitter and Facebook feeds at the top. My script does not use the avia_banner function and therefore does not have the ability to collapse the infotext div and save the user’s choice in a cookie.

    Thanks again!



    Hi Kevin,

    Glad Dude was able to help you! We’ll pass the feature request along to Kriesi.



Viewing 4 posts - 1 through 4 (of 4 total)

The topic ‘twitter variable’ is closed to new replies.