Archived topic
logo image and favicon image
6 replies · Started by Anonymous on June 17, 2015
hello,
I would like to ask:
Where on the www directory should I put the favicon image? I used an on line app to create different favicons for various devices and i extracted all the files directly on C/wamp/www/site_folder. I have also cleared cache browsing data, but favicon still doesn't appear.
also:
I used this css
.site-logo {
float: left;
}
and this (code) in the function.php that i found in a post in this forum in order to appear the logo image left from the site title, but the logo image doesn't shown. Where should I put the logo image in order to appear?
(code)
add_action('generate_before_header_content','generate_insert_logo_before_header_content');
function generate_insert_logo_before_header_content() { ?>
<?php }
THANK YOU!!! :)
Hi there,
1. The favicon.ico file (it must be named that) should be placed in the same directory as the wp-admin, wp-includes and wp-content folders.
2. There's actually a better way to do this now :)
More info here: http://generatepress.com/forums/topic/position-of-the-header-logo/page/2/#post-108123
hi, Tom
I copied this
https://gist.github.com/generatepress/d58dd082dbd741943aee
in my function.php and now I have a blank page! :(
Even the wp-admin is not working!
How can I go back, please?
thank you!
Ah, PHP can be tricky!
Can you access your site via FTP or file manager in your hosting cpanel?
If so, find the functions.php file and delete all of the contents.
When you re-add it, make sure the top of the file has this:
<?php
Hi Tom,
For other devices affects the favicon ??
This is code generated for all devices..
<link rel="apple-touch-icon" sizes="57x57" href="/apple-icon-57x57.png">
<link rel="apple-touch-icon" sizes="60x60" href="/apple-icon-60x60.png">
<link rel="apple-touch-icon" sizes="72x72" href="/apple-icon-72x72.png">
<link rel="apple-touch-icon" sizes="76x76" href="/apple-icon-76x76.png">
<link rel="apple-touch-icon" sizes="114x114" href="/apple-icon-114x114.png">
<link rel="apple-touch-icon" sizes="120x120" href="/apple-icon-120x120.png">
<link rel="apple-touch-icon" sizes="144x144" href="/apple-icon-144x144.png">
<link rel="apple-touch-icon" sizes="152x152" href="/apple-icon-152x152.png">
<link rel="apple-touch-icon" sizes="180x180" href="/apple-icon-180x180.png">
<link rel="icon" type="image/png" sizes="192x192" href="/android-icon-192x192.png">
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="96x96" href="/favicon-96x96.png">
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
<link rel="manifest" href="/manifest.json">
<meta name="msapplication-TileColor" content="#ffffff">
<meta name="msapplication-TileImage" content="/ms-icon-144x144.png">
<meta name="theme-color" content="#ffffff">
if so , Tom , how it would organize code!! in funtions.
How would be the right way. I have no idea if this affects other devices the favicon
add_action('wp_head', 'blog_favicon');
function blog_favicon() {
echo '<link rel="Shortcut Icon" type="image/x-icon" href="'.get_bloginfo('stylesheet_directory').'/images/favicon.ico" />' . "\n";
}
The images folder added in generate child theme..
Do those files exist? (/apple-icon-76×76.png etc..)?
You would have to make sure the href to the images actually go somewhere, then you could place those meta tags in the wp_head hook in "Appearance > GP Hooks".
The favicon PHP function isn't necessary - you simply have to add your favicon.ico file to your root directory via FTP.
