• Resolved HConcepts

    (@hconcepts)


    Hi,

    I uploaded a favicon, in different formats, png, ico and jpg. But none of them can be seen.. Help.

    Rgrds

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter HConcepts

    (@hconcepts)

    I installed a plugin and now its working sweet, thanks!

    This is still an issue with the theme. The favicon doesn’t work. What is the workaround until this gets resolved?

    Just figured out a workaround myself. Here are the details:

    The Favicon functionality within the onetone theme does NOT work. I believe they may simply be uploading the icon to the wrong directory. You do not need a plugin to fix this if you know how to upload files to your host.

    Simply upload your favicon.ico (it must be this exact file name) to your root directory. If there is a favicon.ico already there, replace it. That is all it takes. To see this, you must clear your cache from your browser and reload the page.

    Hope this helps until the issue is fixed within the theme.

    Theme Author MageeWP

    (@magictheme)

    To solve this problem, here is the solution:

    add the code below to the end of includes/theme-functions.php

    add_action( 'wp_head', 'onetone_favicon' );
    
    	function onetone_favicon()
    	{
    	    $url =  onetone_options_array('favicon');
    
    		$icon_link = "";
    		if($url)
    		{
    			$type = "image/x-icon";
    			if(strpos($url,'.png' )) $type = "image/png";
    			if(strpos($url,'.gif' )) $type = "image/gif";
    
    			$icon_link = '<link rel="icon" href="'.esc_url($url).'" type="'.$type.'">';
    		}
    
    		echo $icon_link;
    	}
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Favicon doesnt show’ is closed to new replies.