Ich versuche, die Sprachlink-Icons im Header von http://casaverania.com untereinander zu setzen statt nebeneinander und sie jeweils zu labeln (siehe Bild).
Leider zerschieße ich mir laufend die Seite. Die Drei sind eigentlich Social-Icons, die in den Themeoptions hinterlegt sind. Habe die Bilder gewechselt und die Links entsprechend vergeben.
Habe versucht, hinter den jeweiligen Aufruf in der header.php, ein echo zu setzen, was aber wohl Quark war.
Hat jemand einen Vorschlag für mich?
Innerhalb body-tag:
PHP
<?php
// Get Social Icons
$gdl_icon_type = get_option(THEME_SHORT_NAME.'_header_icon_type', 'light');
$gdl_social_icon = array(
'delicious'=> array('name'=>THEME_SHORT_NAME.'_delicious', 'url'=> GOODLAYERS_PATH.'/images/icon/' . $gdl_icon_type . '/social-icon/delicious.png'),
'deviantart'=> array('name'=>THEME_SHORT_NAME.'_deviantart', 'url'=> GOODLAYERS_PATH.'/images/icon/' . $gdl_icon_type . '/social-icon/deviantart.png'),
'digg'=> array('name'=>THEME_SHORT_NAME.'_digg', 'url'=> GOODLAYERS_PATH.'/images/icon/' . $gdl_icon_type . '/social-icon/digg.png'),
'facebook' => array('name'=>THEME_SHORT_NAME.'_facebook', 'url'=> GOODLAYERS_PATH.'/images/icon/' . $gdl_icon_type . '/social-icon/facebook.png'),
'flickr' => array('name'=>THEME_SHORT_NAME.'_flickr', 'url'=> GOODLAYERS_PATH.'/images/icon/' . $gdl_icon_type . '/social-icon/flickr.png'),
'lastfm'=> array('name'=>THEME_SHORT_NAME.'_lastfm', 'url'=> GOODLAYERS_PATH.'/images/icon/' . $gdl_icon_type . '/social-icon/lastfm.png'),
'linkedin' => array('name'=>THEME_SHORT_NAME.'_linkedin', 'url'=> GOODLAYERS_PATH.'/images/icon/' . $gdl_icon_type . '/social-icon/linkedin.png'),
'picasa'=> array('name'=>THEME_SHORT_NAME.'_picasa', 'url'=> GOODLAYERS_PATH.'/images/icon/' . $gdl_icon_type . '/social-icon/picasa.png'),
'rss'=> array('name'=>THEME_SHORT_NAME.'_rss', 'url'=> GOODLAYERS_PATH.'/images/icon/' . $gdl_icon_type . '/social-icon/rss.png'),
'stumble-upon'=> array('name'=>THEME_SHORT_NAME.'_stumble_upon', 'url'=> GOODLAYERS_PATH.'/images/icon/' . $gdl_icon_type . '/social-icon/stumble-upon.png'),
'skype'=> array('name'=>THEME_SHORT_NAME.'_skype', 'url'=> GOODLAYERS_PATH.'/images/icon/' . $gdl_icon_type . '/social-icon/skype.png'),
'tumblr'=> array('name'=>THEME_SHORT_NAME.'_tumblr', 'url'=> GOODLAYERS_PATH.'/images/icon/' . $gdl_icon_type . '/social-icon/tumblr.png'),
'twitter' => array('name'=>THEME_SHORT_NAME.'_twitter', 'url'=> GOODLAYERS_PATH.'/images/icon/' . $gdl_icon_type . '/social-icon/twitter.png'),
'vimeo' => array('name'=>THEME_SHORT_NAME.'_vimeo', 'url'=> GOODLAYERS_PATH.'/images/icon/' . $gdl_icon_type . '/social-icon/vimeo.png'),
'youtube' => array('name'=>THEME_SHORT_NAME.'_youtube', 'url'=> GOODLAYERS_PATH.'/images/icon/' . $gdl_icon_type . '/social-icon/youtube.png'),
'google_plus' => array('name'=>THEME_SHORT_NAME.'_google_plus', 'url'=> GOODLAYERS_PATH.'/images/icon/' . $gdl_icon_type . '/social-icon/google-plus.png'),
'email' => array('name'=>THEME_SHORT_NAME.'_email', 'url'=> GOODLAYERS_PATH.'/images/icon/' . $gdl_icon_type . '/social-icon/email.png'),
'pinterest' => array('name'=>THEME_SHORT_NAME.'_pinterest', 'url'=> GOODLAYERS_PATH.'/images/icon/' . $gdl_icon_type . '/social-icon/pinterest.png')
);
echo '<div id="gdl-social-icon" class="social-wrapper">';
echo '<div class="social-icon-wrapper">';
foreach( $gdl_social_icon as $social_name => $social_icon ){
$social_link = get_option($social_icon['name']);
if( !empty($social_link) ){
echo '<div class="social-icon"><a target="_blank" href="' . $social_link . '">' ;
echo '<img src="' . $social_icon['url'] . '" alt="' . $social_name . '"/>';
echo '</a></div>';
}
}
echo '</div>'; // social icon wrapper
echo '</div>'; // social wrapper
?>
Alles anzeigen
Codebeispiel in der Optionspage (nur die ersten 3):
PHP
'gdl_panel_social_network' => array(
__('DELICIOUS', 'gdl_back_office')=>array('type'=>'inputtext','name'=>THEME_SHORT_NAME.'_delicious',
'description'=>'Place the link you want and delicious icon will appear. To remove it, just leave it blank.'),
__('DEVIANTART', 'gdl_back_office')=>array('type'=>'inputtext','name'=>THEME_SHORT_NAME.'_deviantart',
'description'=>'Place the link you want and deviantart icon will appear. To remove it, just leave it blank.'),
Originaltheme: http://demo.goodlayers.com/?theme=architecture