G1 Socials

G1 Socials is a simple plugin that lets your users follow you via your social channels.

Installation

The plugin is built into the theme so after theme activation you will be asked to install it.

Updates

After theme update, if new version of the plugin is available, you will be asked to update it (notice on top of the Dashboard).

If for somehow reasons you can't see the notice, you can update the plugin manually.

To do that, go to the WP Admin Panel › Appearance › Install plugins, find the "G1 Socials" plugin on the list and click "Update" right below it.

Setup

After activating the plugin its configuration page will be accessible under the WP Admin Panel › Settings page.

How to add new icon?

To add new icon you need to use the "g1_socials_items" hook. We strongly recommend to add all new icons via our child theme. Below the child theme functions.php file showing how to use the hook to add/remove icon.

<?php>
// Prevent direct script access
if ( !defined( 'ABSPATH' ) )
    die ( 'No direct script access allowed' );
/**
* Child Theme Setup
*
* Always use child theme if you want to make some custom modifications.
* This way theme updates will be a lot easier.
*/

function bimber_childtheme_setup() {
    add_filter( 'g1_socials_items', 'add_remove_g1_socials_item' );
}

add_action( 'after_setup_theme', 'bimber_childtheme_setup' );

function add_remove_g1_socials_item ( $icons ) {
    $child_theme_dir = get_stylesheet_directory_uri();

    // remove 'Facebook' icon
    unset( $icons['facebook'] );

    // add new icon, let's call it 'myicon'
    // 'color' -  defines icon background color
    // 'icon_dir' - defines where the folder with icon is located
    $icons['myicon'] = array(
        'color' => '#ff0000',
        'icon_dir' => $child_theme_dir . '/social-icons/'
    );

    return $icons;
}

Now, you need to add your icons to the folder you specified (via "icon_dir" parameter). You should add icons in all sizes: 16px, 24px, 32px and 48px. Icons should be in the png format.

Change Icons Order

The icon list interface is sortable. You can easily change an icon position just by dragging it (move mouse over a title) after/before other icon.

Notice

If you can't find the Install plugins link in the WP Admin Panel › Appearance section, all your plugins are up to date and you don't need to update anything.