Oliver Theobald
asked 6 years ago

Hi! 
 
Two quick questions.
 
1) How to disable orange RSS icon box on homepage?
 
2) How remove grid category display layout option? I only want readers to have the option of list category display layout option. 
 
Many thanks! 
 
Olly

Alanna Bailey
replied 6 years ago

Hi, I’d like to remove the RSS icon box as well. I’d also like to add other social media icons not there such as – pinterest, youtube and linkedin. please tell me how/where to do this? Thanks. A

1 Answers
DominicStaff
answered 6 years ago

Hello Rohith !
1. To remove the RSS icon in the header, You can log in to Dashboard > Customize > Social Links, then disable/Enable feed link.
2  To add youtube/ printerest 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', false);
$loginlink = dw_get_option('dw_loginlink', false);
$youtube ="test";
$pinterest="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( $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 } ?>
<?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( $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 ) { ?>
<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( $pinterest ) { ?>
<li class="pinterest"><a target="_blank" href="<?php echo $pinterest ?>" title="<?php _e('pinterest','dw-focus') ?>"><i class="icon-pinterest"></i></a></li>
<?php } ?>
</ul><!-- End social links -->

 
Step2:  Open the customization.php file in the folder path “\wp-content\themes\dw-focus\inc“, find the line 310 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]',
));
// pinterest social
$wp_customize->add_setting('option_tree[dw_pinterest]', array(
'default' => '',
'capability' => 'edit_theme_options',
'type' => 'option',
));
$wp_customize->add_control('dw_social_pinterest', array(
'label' => __('pinterest', 'dw_focus'),
'section' => 'dw_social_link',
'settings' => 'option_tree[dw_pinterest]',
));

 
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 .pinterest> a {
background: #...;
}
</style>

3.  To disable the grid format in DW Focus, you can add the following code to the Header Code (Dashboard > Customize > Custom Code. )

<style>
.category .post-layout .layout-grid {
    display: none;
}
.category .post-layout .layout-list {
    display: none;
}
</style>

Then Select the List layout in the Category Setting (Customize > Category Settings ).
Hope this helps ! 

Powered by DW Question & Answer Pro