Jerry Zhou
asked 7 years ago

Hi, I was wondering if DW Trendy will ever be updated with a Pinterest Icon? It is a growing social network for business and would be great if it can be shown on the site. Thanks!

1 Answers
Kido D
answered 7 years ago

Hi Jerry,
Thanks for writing in. We’ll add this to the next update soon!  
For now, to add the pinterest icon, you can follow the steps here:
1) Open up the customize.php file in themes/dw-trendy/lib folder, find the code below (around line 310):

 $wp_customize->add_control('linkedin', array(
'label' => __('LinkedIn', 'dw-trendy'),
'section' => 'dw_trendy_social_links',
'settings' => 'dw_trendy_theme_options[linkedin]'
));

.. and add the following code right below it:

 $wp_customize->add_setting('dw_trendy_theme_options[pinterest]', array(
'default' => '#',
'capability' => 'edit_theme_options',
'type' => 'option'
));
$wp_customize->add_control('pinterest', array(
'label' => __('Pinterest', 'dw-trendy'),
'section' => 'dw_trendy_social_links',
'settings' => 'dw_trendy_theme_options[pinterest]'
));

2) Open up the custom.php file in themes/dw-trendy/lib folder, find the code below (around line 66 & 74):

 $social_links['linkedin'] = dw_trendy_get_theme_option( 'linkedin', '#' );
...
<?php if($social_links['linkedin']!='') { ?><li class="social linkedin"><a href="<?php echo $social_links['linkedin']; ?>"><i class="fa fa-linkedin"></i></a></li><?php } ?>

Change it into this:

 $social_links['linkedin'] = dw_trendy_get_theme_option( 'linkedin', '#' );
$social_links['pinterest'] = dw_trendy_get_theme_option( 'pinterest', '#' );
...
<?php if($social_links['linkedin']!='') { ?><li class="social linkedin"><a href="<?php echo $social_links['linkedin']; ?>"><i class="fa fa-linkedin"></i></a></li><?php } ?>
<?php if($social_links['pinterest']!='') { ?><li class="social pinterest"><a href="<?php echo $social_links['pinterest']; ?>"><i class="fa fa-pinterest"></i></a></li><?php } ?>

3) Go to Dashboard / Appearances / Customize / Custom Code, and add the code below to Header Code section:

 <style>
.social-list .pinterest a:hover {background: #cb2027;}
</style>

 
After 3 steps above, you’ll have the Pinterest section in Dashboard / Appearances / Customize / Social Links. See the screenshot here:
           
Hope this helps!

Jerry Zhou
replied 7 years ago

Thank you very much! I’ll be looking forward to the next update.

Powered by DW Question & Answer Pro