WordPress. How to work with the social icons widget (based on Cherry Framework 3.x)
2015年2月6日
Our Support team is ready to present a new tutorial that will show you how to work with the social icons (based on Cherry Framework)
WordPress. How to work with the social icons widget (based on Cherry Framework)
To enable the widget,请执行以下操作(如果您使用了 sample data 文件,它应该已经启用):
-
Navigate to Appearance > Widgets 在你的WordPress中 Dashboard.
-
Under 可用的小部件 find 樱桃-社交网络.
-
拖放 樱桃-社交网络 widget into the needed widget area:
-
默认情况下,有7个社交网站 media networks in the widget. 每个图标有两个选项:URL和标签.
-
You can use the check box to select what should be displayed on the website:
-
To enable the icons, you need to fill the url/label fields in. 带有空字段的图标将不显示.
-
完成后,单击 Save at the bottom.
-
检查您的站点以查看更改.
In order to replace the social networks icons, you will need to replace the original .png files in wp-content /主题/主题# # # # # /图片/图标 directory 在您的服务器上上传新的 .具有相同标题的PNG图像.
In order to make the links open in a new window,请做以下工作:
-
Navigate to wp-content # # # # # / /主题/主题包括/ widget / directory on your server. Check if my-social-widget.php file exists.
-
If this file exists in the mentioned folder of your child theme, skip to the next step, otherwise please follow the steps below:
-
Go to the wp-content / plugins /樱桃-plugin包括/部件 directory via FTP or hosting file manager. Download my-social-widget.php file.
-
复制/移动复制的文件到 wp-content /主题/主题# # # # # /包含小部件 folder.
-
-
Open my-social-widget.php file to edit.
-
Hit Ctrl + F on your keyboard and look for this line:
-
Add target=”_blank” after the href=”” attribute. 代码应该如下所示:
-
Save changes and check the social links on your site.
为了添加新的社交 media icon, for instance one for Picasa (you will just need to change “Picasa” and “picasa” in the lines of this tutorial if you are going to add a different button, 像“Lastfm”/“Lastfm”, “微博”/“Tumblr”等.),请做以下工作:
-
Navigate to wp-content # # # # # / /主题/主题包括/ widget / directory on your server.
-
Open my-social-widget.php file to edit.
-
在(任意一行都可以用Ctrl + F找到)下:
$networks['Twitter']['link'] = $instance['twitter']; $networks['Facebook']['link'] = $instance['facebook']; $networks['Flickr']['link'] = $instance['flickr']; $networks['Linkedin']['link'] = $instance['linkedin']; $networks['Delicious']['link'] = $instance['delicious']; $networks['Youtube']['link'] = $instance['youtube'];
add:
$networks['Picasa']['link'] = $instance['picasa'];
-
Under:
$networks['Twitter']['label'] = $instance['twitter_label']; $networks['Facebook']['label'] = $instance['facebook_label']; $networks['Flickr']['label'] = $instance['flickr_label']; $networks['Instagram']['label'] = $instance['instagram_label']; $networks['Rss']['label'] = $实例(“rss_label”); $networks['Delicious']['label'] = $instance['delicious_label']; $networks['Linkedin']['label'] = $instance['linkedin_label']; $networks['Google_plus']['label'] = $instance['google_plus_label'];
add:
$networks['Picasa']['label'] = $instance['picasa_label'];
-
Change:
to:
-
Under:
$instance['twitter'] = $new_instance['twitter']; $instance['facebook'] = $new_instance['facebook']; $instance['flickr'] = $new_instance['flickr']; $instance['instagram'] = $new_instance['instagram']; 美元的实例(“rss”) = $ new_instance(“rss”); $instance['delicious'] = $new_instance['delicious']; $instance['linkedin'] = $new_instance['linkedin']; $instance['google_plus'] = $new_instance['google_plus'];
add:
$instance['picasa'] = $new_instance['picasa'];
-
Under:
$instance['twitter_label'] = $new_instance['twitter_label']; $instance['facebook_label'] = $new_instance['facebook_label']; $instance['flickr_label'] = $new_instance['flickr_label']; $instance['instagram_label'] = $new_instance['instagram_label']; 美元的实例(“rss_label”) = $ new_instance [' rss_label ']; $instance['delicious_label'] = $new_instance['delicious_label']; $instance['linkedin_label'] = $new_instance['linkedin_label']; $instance['google_plus_label'] = $new_instance['google_plus_label'];
add:
$instance['picasa_label'] = $new_instance['picasa_label'];
-
Change:
$defaults = array( 'title' => '', 'twitter' => '', 'twitter_label' => '', 'facebook' => '', 'facebook_label' => '', 'flickr' => '', 'flickr_label' => '', 'instagram' => '', 'instagram_label' => '', 'rss' => '', 'rss_label' => '', 'delicious' => '', 'delicious_label' => '', 'linkedin' => '', 'linkedin_label' => '', 'google_plus' => '', 'google_plus_label' => '', 'display' => 'icons', 'text' => '');
to:
$defaults = array( 'title' => '', 'twitter' => '', 'twitter_label' => '', 'facebook' => '', 'facebook_label' => '', 'flickr' => '', 'flickr_label' => '', 'instagram' => '', 'instagram_label' => '', 'rss' => '', 'rss_label' => '', 'delicious' => '', 'delicious_label' => '', 'linkedin' => '', 'linkedin_label' => '', 'google_plus' => '', 'google_plus_label' => '', 'picasa' => '', 'picasa_label' => '', 'display' => 'icons', 'text' => '');
-
Under:
$twitter = $instance['twitter']; $facebook = $instance['facebook']; $flickr = $instance['flickr']; $instagram = $instance['instagram']; $rss = $实例(“rss”); $delicious = $instance['delicious']; $linkedin = $instance['linkedin']; $google_plus = $instance['google_plus'];
add:
$instance['picasa'] = $new_instance['picasa'];
-
Under:
$twitter_label = $instance['twitter_label']; $facebook_label = $instance['facebook_label']; $flickr_label = $instance['flickr_label']; $instagram_label = $instance['instagram_label']; $rss_label = $实例(“rss_label”); $delicious_label = $instance['delicious_label']; $linkedin_label = $instance['linkedin_label']; $google_plus_label = $instance['google_plus_label'];
add:
$picasa_label = $instance['picasa_label'];
-
Under:
Add:
-
Save changes when you are done editing the file.
-
Upload a picasa.png to the wp-content /主题/主题# # # # # /图片/图标/ 服务器上的文件夹. The new image should have the same dimensions as the original social icons images in this folder. 有时在 wp-content /主题/主题# # # # # /图片/图标 文件夹中已经包含图标.
-
在你的WordPress管理中,转到 Appearance > Widgets > 樱桃-社交网络. There should be a new option for Picasa at the bottom with the two fields to fill in:
例如,为了更改工具提示 facebook to myfacebook,请做以下工作:
-
Rename facebook.png in the wp-content /主题/主题# # # # # /图片/图标 folder to myfacebook.png
-
Open my-social-widget.php 文件位于 wp-content /主题/主题# # # # # /包含小部件 folder.
-
在第15行更改名称:
$networks['Facebook']['link'] = $instance['facebook'];
to:
$networks['Myfacebook']['link'] = $instance['facebook'];
-
第48行是这样的:
-
保存更改并检查 tooltip on your site.
Feel free to check the detailed video tutorial below:
WordPress. How to work with the social icons widget (based on Cherry Framework)