Rohith Nuguri
asked 10 years ago

Hello,
1. I am unable to remove the login button beside the social icons. Disabling it in the customize section does not help either. 
2. How can i add more social icons such as flikr and youtube.
3. Add search bar to the left of the social icons.
 
Thank you 

1 Answers
DominicStaff
answered 10 years ago

Hello Rohith !
1. To remove the login button beside the social icon, You can add the following code to the “Header Script”

<style>
.login {
    display: none !important;
}
</style>

2. To add youtube icon on the header of the DW Focus, Please do as the following:
Step1: Open the header.php file in the folder path “\wp-content\themes\dw-focus“, find the line 72 to 99.
Replace the following code:

// Social links
$facebook = dw_get_option('dw_facebook');
$twitter = dw_get_option('dw_twitter');
$gplus = dw_get_option('dw_gplus');
$linkedin = dw_get_option('dw_linkedin');
$feedlink = dw_get_option('dw_feedlink', true);
$loginlink = dw_get_option('dw_loginlink', true);
?>
<ul class="social-links visible-desktop"><?php if( $facebook ) { ?>
li class="facebook"><a target="_blank" href="<?php echo $facebook; ?>" title="<?php _e('Facebook','dw-focus') ?>"><i class="icon-facebook"></i></a></li>
<?php } ?>
<?php if( $twitter ) { ?>
<li class="twitter"><a target="_blank" href="<?php echo $twitter;  ?>" title="<?php _e('Twitter','dw-focus') ?>"><i class="icon-twitter"></i></a></li>
<?php } ?>
<?php if(  $gplus ) { ?><li class="google-plus"><a target="_blank" href="<?php echo $gplus ?>" title="<?php _e('Google Plus','dw-focus') ?>"><i class="icon-google-plus"></i></a></li>
<?php } ?>
<?php if( $linkedin ) { ?><li class="linkedin"><a target="_blank" href="<?php echo $linkedin ?>" title="<?php _e('Linked in','dw-focus') ?>"><i class="icon-linkedin"></i></a></li>
<?php } ?>
<?php if( $feedlink ) { ?>
<li class="rss"><a href="<?php bloginfo('rss2_url'); ?>" title="<?php _e('Rss','dw-focus') ?>"><i class="icon-rss"></i></a></li>
 <?php } ?>
 <?php if( $loginlink ) { ?>
 <li class="login"><a href="<?php echo wp_login_url( get_permalink() ); ?>" title="<?php _e('Login','dw-focus') ?>"><i class="icon-user"></i></a>
  <?php } ?>
  </ul><!-- End social links -->

With new code:

// Social links
$facebook = dw_get_option('dw_facebook');
$twitter = dw_get_option('dw_twitter');
$gplus = dw_get_option('dw_gplus');
$linkedin = dw_get_option('dw_linkedin');
$feedlink = dw_get_option('dw_feedlink', true);
$loginlink = dw_get_option('dw_loginlink', true);
$youtube ="test";
$flickr="test";
?>
<ul class="social-links visible-desktop">
<?php if( $facebook ) { ?>
<li class="facebook"><a target="_blank" href="<?php echo $facebook; ?>" title="<?php _e('Facebook','dw-focus') ?>"><i class="icon-facebook"></i></a></li>
<?php } ?>
<?php if( $twitter ) { ?><li class="twitter"><a target="_blank" href="<?php echo $twitter;  ?>" title="<?php _e('Twitter','dw-focus') ?>"><i class="icon-twitter"></i></a></li>
<?php } ?>
<?php if(  $gplus ) { ?><li class="google-plus"><a target="_blank" href="<?php echo $gplus ?>" title="<?php _e('Google Plus','dw-focus') ?>"><i class="icon-google-plus"></i></a></li>
<?php } ?>
<?php if( $linkedin ) { ?>
<li class="linkedin"><a target="_blank" href="<?php echo $linkedin ?>" title="<?php _e('Linked in','dw-focus') ?>"><i class="icon-linkedin"></i></a></li>
<?php } ?>
<?php if( $feedlink ) { ?>
<li class="rss"><a href="<?php bloginfo('rss2_url'); ?>" title="<?php _e('Rss','dw-focus') ?>"><i class="icon-rss"></i></a></li>
<?php } ?>
<?php if( $youtube) { ?>
<?php if( $youtube ) { ?><li class="youtube"><a target="_blank" href="<?php echo $youtube ?>" title="<?php _e('youtube','dw-focus') ?>"><i class="icon-youtube"></i></a></li>
<?php } ?>
<?php if( $flickr) { ?>
<?php if( $flickr) { ?><li class="flickr"><a target="_blank" href="<?php echo $flickr?>" title="<?php _e('flickr','dw-focus') ?>"><i class="icon-flickr"></i></a></li>
<?php } ?>
<?php if( $loginlink ) { ?><li class="login"><a href="<?php echo wp_login_url( get_permalink() ); ?>" title="<?php _e('Login','dw-focus') ?>"><i class="icon-user"></i></a>
<?php } ?>
 </ul><!-- End social links -->

 
See the screenshot: 
 
Step2:  Open the customization.php file in the folder path “\wp-content\themes\dw-focus\inc“, find the line 248 then add the following code:

// youtube social

    $wp_customize->add_setting('option_tree[dw_youtube]', array(
        'default'        => '',
        'capability'     => 'edit_theme_options',
        'type'           => 'option',
 
    ));
 
    $wp_customize->add_control('dw_social_youtube', array(
        'label'      => __('youtube', 'dw_focus'),
        'section'    => 'dw_social_link',
        'settings'   => 'option_tree[dw_youtube]',
    ));

// flickr social

    $wp_customize->add_setting('option_tree[dw_flickr]', array(
        'default'        => '',
        'capability'     => 'edit_theme_options',
        'type'           => 'option',
 
    ));
 
    $wp_customize->add_control('dw_social_flickr', array(
        'label'      => __('flickr', 'dw_focus'),
        'section'    => 'dw_social_link',
        'settings'   => 'option_tree[dw_flickr]',
    ));

See the screenshot:

Step3: Lo g in to Dashboard > Theme > Customize > Social Links then add your youtube link.
See the screenshot:
Step4: To change background for the icon youtube & flickr, please add the following code to the Header Code:

<style>
.social-links .youtube > a {
    background: #...;
}
.social-link .flickr > a {
background: #...;
}
</style>

3. Our DW Focus does not yet support to add a search bar to the left side of the social icons.
Hope this helps !

Powered by DW Question & Answer Pro