Skip to content

Instantly share code, notes, and snippets.

@ellenmva
Created September 11, 2014 12:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ellenmva/14e922ca5b70cabd6e93 to your computer and use it in GitHub Desktop.
Save ellenmva/14e922ca5b70cabd6e93 to your computer and use it in GitHub Desktop.
Add Cimy User Extra Fields Single Bits
@facebook: #3B5998;
@twitter: #00ACED;
.author-links {
text-align: center;
a {
margin-right: 10px; // Here in-case you wish to add margins
padding: 0px; // Here in-case you wish to add padding
}
li {
display: inline;
}
.fa {
.border-radius(0px); // Here in-case you wish to add a radius
margin-bottom: 5px;
min-width: 30px;
color: #FFF;
text-align: center;
font-size: 18px;
line-height: 30px;
&:hover { .transition(background 400ms linear); }
}
.fa-facebook {
background-color: @facebook;
&:hover { background-color: lighten(@facebook, 10%); }
}
.fa-twitter {
background-color: @twitter;
&:hover { background-color: lighten(@twitter, 10%); }
}
}
$facebook = get_cimyFieldValue(get_the_author_meta( 'ID' ), 'FACEBOOK');
$twitter = get_cimyFieldValue(get_the_author_meta( 'ID' ), 'TWITTER');
echo '<ul class="author-links">';
if($facebook)
echo '<li><a href="'. cimy_uef_sanitize_content($facebook) .'" target="_blank"><i class="fa fa-facebook"></i></a></li>';
if($twitter)
echo '<li><a href="'. cimy_uef_sanitize_content($twitter) .'" target="_blank"><i class="fa fa-twitter"></i></a></li>';
echo '</ul>';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment