Jump to content
Sign in to follow this  
dfeller

Re-Order Social Icons in Header

Recommended Posts

unne

Could someone elaborate on this a bit more. I tried experimenting with different values for the code that Jay posted and although some things changed, I was not able to get a hang of how to control it. I'd end up with two twitter buttons, or with different values even halfway in between two icons. Please help. my site is: www.mix-engineer.com my current social icon order is: youtube, linked in, facebook, twitter and rss. I'd like it to be: facebook, youtube, twitter, linked in, rss. Thanks.

Share this post


Link to post
Share on other sites
kastelic

I know an easy way to reverse their order. Try in Custom CSS:

.icons a {float:left !important;}

To give them a custom order would require digging into the template files and overriding that section in Base.

Share this post


Link to post
Share on other sites
unne

Thanks Jimmy. Maybe if I get rid of the RSS, then the order is a little better, but I'd really like to have facebook come first from the left. If you or anyone knows which file this stuff lives in so I have a place to start looking, I'd appreciate it.

Share this post


Link to post
Share on other sites
kastelic

Look in platformpro/template.branding.php

Share this post


Link to post
Share on other sites
unne

Thanks again Jimmy. I actually worked it out. In case someone else wants to do this, here's what I did: Download the "template.branding.php" file and open it in your editor of choice. It's a short file and I don't think it does anything other than deal with the social icons. In it, there's a section for each of the social icons. The sections start with "<?php if" and end with "<?php endif;?>" and you can easily identify them by their names that show up in each section (linkedinlink, youtubelink etc) All you have to do is move the sections around to determine their order. Since the icons are in the top right, the order goes from right to left. I changed my code from this:

<div class="branding_wrap">
		<?php pagelines_main_logo(); ?>
	
		<?php pagelines_register_hook( 'pagelines_before_branding_icons', 'branding' ); // Hook ?>
	
		<div class="icons" style="bottom: <?php echo intval(pagelines_option('icon_pos_bottom'));?>px; right: <?php echo pagelines_option('icon_pos_right');?>px;">
	
			<?php if(pagelines('rsslink')):?>
			" class="rsslink">
			<?php endif;?>
	
			<?php if(VPRO):?>
				<?php pagelines_register_hook( 'pagelines_branding_icons_start', 'branding' ); // Hook ?>
				<?php if(pagelines_option('twitterlink')):?>
				" class="twitterlink">
				<?php endif;?>
				<?php if(pagelines_option('facebooklink')):?>
				" class="facebooklink">
				<?php endif;?>
				<?php if(pagelines_option('linkedinlink')):?>
				" class="linkedinlink">
				<?php endif;?>
				<?php if(pagelines_option('youtubelink')):?>
				" class="youtubelink">
				<?php endif;?>
				<?php pagelines_register_hook( 'pagelines_branding_icons_end', 'branding' ); // Hook ?>
			<?php endif;?>
	
		</div>
	</div>
	<?php pagelines_register_hook( 'pagelines_after_branding_wrap', 'branding' ); // Hook ?>[/code]

	
	To this:
	
	
[code]<div class="branding_wrap"> <?php pagelines_main_logo(); ?> <?php pagelines_register_hook( 'pagelines_before_branding_icons', 'branding' ); // Hook ?> <div class="icons" style="bottom: <?php echo intval(pagelines_option('icon_pos_bottom'));?>px; right: <?php echo pagelines_option('icon_pos_right');?>px;"> <?php if(pagelines('rsslink')):?> " class="rsslink"> <?php endif;?> <?php if(pagelines_option('linkedinlink')):?> " class="linkedinlink"> <?php endif;?> <?php if(pagelines_option('youtubelink')):?> " class="youtubelink"> <?php endif;?> <?php if(VPRO):?> <?php pagelines_register_hook( 'pagelines_branding_icons_start', 'branding' ); // Hook ?> <?php if(pagelines_option('twitterlink')):?> " class="twitterlink"> <?php endif;?> <?php if(pagelines_option('facebooklink')):?> " class="facebooklink"> <?php endif;?> <?php pagelines_register_hook( 'pagelines_branding_icons_end', 'branding' ); // Hook ?> <?php endif;?> </div> </div> <?php pagelines_register_hook( 'pagelines_after_branding_wrap', 'branding' ); // Hook ?>

Share this post


Link to post
Share on other sites
unne

Sorry, that code pasted a little strangely, you'll have to look for "to this" to see where the old code ends and the new one starts. And once you're done editing, simply upload the file again, but this time into the platformbase folder instead where it will override the original.

Share this post


Link to post
Share on other sites
klausk
this worked for me ( i did of course make a backup of the original file first...) Thanks!!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×