Archived

This topic is now archived and is closed to further replies.

  • 0

Twitter Bar Content Floating Right In Header

Question

Posted · Report post

I really like the styling of the Twitter bar included with Pagelines Platform Pro. Is there any easy way I can have that same styling displaying my latest tweet easily in the header floating right where the icons usually are?

Share this post


Link to post
Share on other sites

19 answers to this question

Posted · Report post

Okay, this almost works... it displays the content and has the divs, but I can't find the spot to grey out the background full width. ` add_action('pagelines_before_branding_icons', 'twitter_spot'); function twitter_spot(){?> <?php if(pagelines('twittername') ):?>

<?php if(function_exists('twitter_messages') && pagelines('twittername')):?> <?php pagelines_register_hook( 'pagelines_before_twitterbar_text', $$this->id );?> "<?php twitter_messages(pagelines('twittername'), 1, false, false, '', false, false, false); ?>" — <?php echo pagelines('twittername');?> <?php else:?> <?php _e('Please install and activate the "Twitter for WordPress" plugin to use this section.', 'pagelines');?> <?php endif;?>
<?php else:?>
<?php _e('Set your Twitter account name in your settings to use the TwitterBar Section.', 'pagelines');?>
<?php endif;?> <?php } `

Share this post


Link to post
Share on other sites

Posted · Report post

Thanks Bryan. Any word?

Share this post


Link to post
Share on other sites

Posted · Report post

Sent again, we've gotten quite busy with the PlatformPro launch. Thanks, Bryan

Share this post


Link to post
Share on other sites

Posted · Report post

Forwarded to developers. Thanks, Bryan

Share this post


Link to post
Share on other sites

Posted · Report post

Start by making sure you are using the platformbase theme for customizing, then I'll show you how to do it with a hook

Share this post


Link to post
Share on other sites

Posted · Report post

I am using the platformbase theme.

Share this post


Link to post
Share on other sites

Posted · Report post

add this to your functions.php file ` add_action('pagelines_before_branding_icons', 'twitter_spot'); function twitter_spot(){?> <?php if(pagelines('twittername') ):?>

<?php if(function_exists('twitter_messages') && pagelines('twittername')):?> <?php pagelines_register_hook( 'pagelines_before_twitterbar_text', $this->id );?> "<?php twitter_messages(pagelines('twittername'), 1, false, false, '', false, false, false); ?>" — <?php echo pagelines('twittername');?> <?php else:?> <?php _e('Please install and activate the "Twitter for WordPress" plugin to use this section.', 'pagelines');?> <?php endif;?>
<?php else:?>
<?php _e('Set your Twitter account name in your settings to use the TwitterBar Section.', 'pagelines');?>
<?php endif;?> <?php } `

Share this post


Link to post
Share on other sites

Posted · Report post

i did test the code before posting, so it's likely a problem with where you pasted? Put it above this line `function base_sections(){`

Share this post


Link to post
Share on other sites

Posted · Report post

Robb, how you doing with this? Can we get a link to your site?

Share this post


Link to post
Share on other sites

Posted · Report post

Ok I added that and it still isn't showing. What do I need to do?

Share this post


Link to post
Share on other sites

Posted · Report post

Actually...when I add that code to the functions.php file it breaks everything below it. On the page...nothing loads past where the Twitter bar should show up.

Share this post


Link to post
Share on other sites

Posted · Report post

It is still breaking everything from that point down.

Share this post


Link to post
Share on other sites

Posted · Report post

You do know you are putting Twitter to use incorrectly in your content management right? Instead of having twitter post on your website you should be using twitter to disperse when you update your website.

Share this post


Link to post
Share on other sites

Posted · Report post

Displaying active tweets on your website converts into more followers by showing that you are active within that social media space. Otherwise, readers that did not land on your page from twitter might not know you are active there. It just takes it one step further than displaying an icon in an area of the site that is not currently being used. You then have your feed update on Twitter to pull followers back to your content.

Share this post


Link to post
Share on other sites

Posted · Report post

Depending on what setup you have it may change but this CSS sets me up inline with the logo and left of the icons ` .tbubble { float:right; position:relative; top:23px; width:480px; } ` Also, you don't need the texture, content, or content-pad divs to be wrapping the code.

Share this post


Link to post
Share on other sites

Posted · Report post

Robb, Since you have to use the "Twitter for Wordpress" plugin anyways, you may as well just use the plugins php code. Simply change the username in the code below and place this php call where you want:

<?php twitter_messages("meggmusic"); ?>

I you want to stylize the text, simply put a div around it.

Share this post


Link to post
Share on other sites

Posted · Report post

Forwarding for continued developer help. Thanks, Bryan

Share this post


Link to post
Share on other sites