Add New Social Widget

As an example, we are adding the Instagram social icon. Please go to file \specular\includes\widgets\codeless_socialwidget.php
Find the code in here:
http://www.codeshare.io/LFuRJ

and add this one below the above code:
http://www.codeshare.io/NntJU
Then edit the file specular\includes\core\codeles_options.php, find the lines:

$this->sections[] = array(
                'icon' => 'el-icon-twitter',
                'title' => __('Social Media', 'codeless-admin'),
                'fields' => array(
                    array(
                        'id'       => 'facebook',
                        'type'     => 'text',
                        'title'    => __('Facebook Link', 'codeless-admin')
                    ),
                    array(
                        'id'       => 'twitter',
                        'type'     => 'text',
                        'title'    => __('Twitter Link', 'codeless-admin')
                    ),
                    array(
                        'id'       => 'flickr',
                        'type'     => 'text',
                        'title'    => __('Flickr Link', 'codeless-admin')
                    ),
                    array(
                        'id'       => 'foursquare',
                        'type'     => 'text',
                        'title'    => __('Foursquare Link', 'codeless-admin')
                    ),
                    array(
                        'id'       => 'google',
                        'type'     => 'text',
                        'title'    => __('Google Plus Link', 'codeless-admin')
                    ),
                    array(
                        'id'       => 'dribbble',
                        'type'     => 'text',
                        'title'    => __('Dribbble Link', 'codeless-admin')
                    ),
                    array(
                        'id'       => 'linkedin',
                        'type'     => 'text',
                        'title'    => __('Linkedin Link', 'codeless-admin')
                    ),

                    array(
                        'id'       => 'youtube',
                        'type'     => 'text',
                        'title'    => __('Youtube Link', 'codeless-admin')
                    ),

                    array(
                        'id'       => 'email',
                        'type'     => 'text',
                        'title'    => __('Email Link', 'codeless-admin')
                    ),

and add this one below it:

array(
                        'id'       => 'instagram',
                        'type'     => 'text',
                        'title'    => __('Instagram Link', 'codeless-admin')
                    )

Now you can refresh the general options and you can see there at Social Media section a new field for the Instagram link.

Reference topic.

Comments

comments

Was this article helpful?

Related Articles

Leave A Comment?