insidr
asked 10 years ago

Hi! First of all thanks for the brilliant theme!

I’m using VKonrakte (vk.com) Russian social network and i’d like add button to left side panel. How can i do it?

insidr
replied 10 years ago

And how to edit images of social buttons?

2 Answers
Jackie Lord
answered 10 years ago

In order to add social buttons to the left side panel, please follow my instruction here:

1. Open file extras.php in folder /wp-content/themes/dw-minion/inc/

2. Add the code to insert another social button (you can copy and paste the existing code line and replace the value with your new social link)

If you want to edit the image of social idon, please replace the following code with your code to insert a new image.

 <i class="icon-..."></i>

 

Jonathan Chen
replied 10 years ago

Hi Jackie Lord,

I came across this and also wanna know how to do this. I found the code but how to code if I want to link an image from my own database? I’m not sure how I’d do that.

Also what size should I make the icon and will it still have the hover effect when I add a new icon? The one I want to add is Pinterest. I have another theme on at the moment but want to finalize any issue wit this one as I want to switch over to this. Thank you, please let me know at your earliest convenience. Happy New Year.

DominicStaff
answered 10 years ago

Hi @Jonathan !

To add more social media  (example: pinterest, instagram and tumblr ) to the theme DW Minion. Please do as the following:
Step1: Open the extras.php file in the folder path “\wp-content\themes\dw-minion\inc”.
Step2: Add the following code to the line 210 -> 214.

 $social_links['pinterest'] = dw_minion_get_theme_option( 'pinterest', '' );
 $social_links['instagram'] = dw_minion_get_theme_option( 'instagram', '' );
 $social_links['tumblr'] = dw_minion_get_theme_option( 'tumblr', '' );

See the screenshot:
 
– Next, add the following code to the line 241 -> 245.

<?php if($social_links['pinterest']!='') { ?><li class="social"><a href="<?php echo $social_links['pinterest']; ?>"><i class="icon-pinterest"></i></a></li><?php } ?>
<?php if($social_links['instagram']!='') { ?><li class="social"><a href="<?php echo $social_links['instagram']; ?>"><i class="icon-instagram"></i></a></li><?php } ?>
<?php if($social_links['tumblr']!='') { ?><li class="social"><a href="<?php echo $social_links['tumblr']; ?>"><i class="icon-tumblr"></i></a></li><?php } ?>

See the screenshot:
 
Notice: you can find the Media Icon here: http://fortawesome.github.io/Font-Awesome/3.2.1/icons/

Then change your icon that you want to display here: <i class=”icon-tumblr“>
Step3:  Please open the customizer.php file in the folder path “\wp-content\themes\dw-minion\inc” then add the following code to the line 202.

// Demo add more social media --pinterest, instagram and tumblr---
  $wp_customize->add_setting('dw_minion_theme_options[pinterest]', array(
    'default'        => '',
    'capability'     => 'edit_theme_options',
    'type'           => 'option',
  ));
  $wp_customize->add_control('pinterest', array(
    'label'      => __('Pinterest', 'dw-minion'),
    'section'    => 'dw_minion_social_links',
    'settings'   => 'dw_minion_theme_options[pinterest]',
  ));
 
 $wp_customize->add_setting('dw_minion_theme_options[instagram]', array(
    'default'        => '',
    'capability'     => 'edit_theme_options',
    'type'           => 'option',
  ));
  $wp_customize->add_control('instagram', array(
    'label'      => __('Instagram', 'dw-minion'),
    'section'    => 'dw_minion_social_links',
    'settings'   => 'dw_minion_theme_options[instagram]',
  ));
 
 $wp_customize->add_setting('dw_minion_theme_options[tumblr]', array(
    'default'        => '',
    'capability'     => 'edit_theme_options',
    'type'           => 'option',
  ));
  $wp_customize->add_control('tumblr', array(
    'label'      => __('Tumblr', 'dw-minion'),
    'section'    => 'dw_minion_social_links',
    'settings'   => 'dw_minion_theme_options[tumblr]',
  ));

See the screenshot: 

Step4: Log in to Dashboard > Theme > Customize > Social Links then add  your link to the frame.
See the  Screenshot: 

– If you want to change the default icon of the social media with your icon. You can add your image to the Media, copy File URL.
See the screenshot: 

 
Next, add the following code to the style.css file.

.icon-pinterest {
background: url('File Url');
}
.icon-pinterest:before {
content: none;
}

.icon-instagram {
background: url('File Url');
}

.icon-instagram:before {
content: none;
}

2. To change the color for sidebar in the DW Minion. You can log in to Dashboard > Theme > Customize > Custom Code then add the following code to the “Header Script”

<style>
.site-actions i {
    background: #C60070;
    color: #FFFFFF;
}

.action.search label {
    background-color: #C60070;
    color: #fff;
}
body {
   background-color: #C60070;
}
.social {
   border-bottom-color: #fff;
}
.site-actions .actions > .action {
     border-bottom-color: #fff;
}
.site-actions .actions > .back-top {
border-top-color: #fff;
}

.no-touch .site-actions .social:hover i {
    background: #FF1493;
    color: #FFFFFF;
}
.no-touch .action.search:hover label {
    background-color: #FF1493;
    color: #FFFFFF;
}
.action.search .search-query {
    background-color: #FF1493;
    color: #FFFFFF;
}
.action.search.active label {
  background: #C60070;
}
</style>

Hope this helps !

Powered by DW Question & Answer Pro