Instantly share code, notes, and snippets.

@cdils /functions.php
Last active Dec 13, 2018

Embed
What would you like to do?
<?php //remove this line
add_filter( 'simple_social_default_profiles', 'biw_add_new_simple_icon' );
/**
* Add Houzz icon to Simple Social Icons plugin.
*
* @param array $icons Social icons to include in widget options.
*
* @return array Updated icon set.
*/
function biw_add_new_simple_icon( $icons ) {
$icons['houzz'] = [
'label' => __( 'Houzz', 'simple-social-icons' ),
'pattern' => '<li class="social-houzz"><a href="%s" %s><svg role="img" class="social-houzz-svg" aria-labelledby="social-houzz"><title id="social-houzz">' . __( 'Houzz icon', 'simple-social-icons' ) . '</title><use xlink:href="' . esc_url( get_stylesheet_directory_uri(__FILE__) . '/images/houzz.svg#social-houzz' ) . '"></use></svg></a></li>',
];
return $icons;
}
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
<svg id="social-houzz" viewBox="0 0 54 60" xmlns="http://www.w3.org/2000/svg">
<path d="M-20-20h94V80h-94z" fill="none"/>
<path d="M34 60h20V25.5L14 14V0H0v60h20V40h14z"/>
</svg>
@c12281

This comment has been minimized.

Copy link

c12281 commented Dec 13, 2018

I copy and pasted the code above to the functions.php file and got the following error message:

Your PHP code changes were rolled back due to an error on line 225 of file wp-content/themes/gallery-pro/functions.php. Please fix and try saving again.

syntax error, unexpected '<', expecting end of file_

Here's the code that's on line 225:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment