• Hi sir.
    when i edited primary sidebar to added social button and that showed this :
    Notice: Array to string conversion in /home/ontawall/public_html/wp-content/themes/hueman/functions.php on line 297
    you can visite my website to see more detail problem : https://www.ontawall.com

    please need your help.
    thank you

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hello,
    This type of error may arise due to error on php coding, missed closing or opening tags etc. Please paste the code here you edited. I will try to find the mistake on code.

    Thanks

    Thread Starter 20phy

    (@20phy)

    this is it on line 297 at function.php script :

    /*  Social links
    /* ------------------------------------ */
    if ( ! function_exists( 'alx_social_links' ) ) {
    
    	function alx_social_links() {
    		if ( !ot_get_option('social-links') =='' ) {
    			$links = ot_get_option('social-links', array());
    			if ( !empty( $links ) ) {
    				echo '<ul class="social-links">';
    				foreach( $links as $item ) {
    
    					// Build each separate html-section only if set
    					if ( isset($item['title']) && !empty($item['title']) )
    						{ $title = 'title="' .$item['title']. '"'; } else $title = '';
    					if ( isset($item['social-link']) && !empty($item['social-link']) )
    						{ $link = 'href="' .$item['social-link']. '"'; } else $link = '';
    					if ( isset($item['social-target']) && !empty($item['social-target']) )
    						{ $target = 'target="' .$item['social-target']. '"'; } else $target = '';
    					if ( isset($item['social-icon']) && !empty($item['social-icon']) )
    						{ $icon = 'class="fa ' .$item['social-icon']. '"'; } else $icon = '';
    					if ( isset($item['social-color']) && !empty($item['social-color']) )
    						{ $color = 'style="color: ' .$item['social-color']. ';"'; } else $color = '';
    
    // Put them together
    	if ( isset($item['title']) && !empty($item['title']) && isset($item['social-icon']) && !empty($item['social-icon']) && ($item['social-icon'] !='fa-') ) {
    	echo '
    <li><a rel="nofollow"><i '.$icon.' '.$color.'></i></a></li>
    ';
    					}
    				}
    				echo '';
    			}
    		}
    	}
    
    }
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘social button got noticed’ is closed to new replies.