- This topic has 6 replies, 2 voices, and was last updated 8 years, 2 months ago by
Tom.
-
AuthorPosts
-
June 17, 2015 at 6:16 am #115135
kiki
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!!! π
June 17, 2015 at 6:55 am #115140kiki
June 17, 2015 at 1:49 pm #115234Tom
Lead DeveloperLead DeveloperHi 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
June 19, 2015 at 7:01 am #115552kiki
hi, Tom
I copied this
https://gist.github.com/generatepress/d58dd082dbd741943aeein 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!
June 19, 2015 at 8:50 am #115569Tom
Lead DeveloperLead DeveloperAh, 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
July 16, 2015 at 7:54 am #121504Hector Vargas
Hi Tom,
For other devices affects the favicon ??
This is code generated for all devices..
<link rel=”apple-touch-icon” sizes=”57×57″ href=”/apple-icon-57×57.png”>
<link rel=”apple-touch-icon” sizes=”60×60″ href=”/apple-icon-60×60.png”>
<link rel=”apple-touch-icon” sizes=”72×72″ href=”/apple-icon-72×72.png”>
<link rel=”apple-touch-icon” sizes=”76×76″ href=”/apple-icon-76×76.png”>
<link rel=”apple-touch-icon” sizes=”114×114″ href=”/apple-icon-114×114.png”>
<link rel=”apple-touch-icon” sizes=”120×120″ href=”/apple-icon-120×120.png”>
<link rel=”apple-touch-icon” sizes=”144×144″ href=”/apple-icon-144×144.png”>
<link rel=”apple-touch-icon” sizes=”152×152″ href=”/apple-icon-152×152.png”>
<link rel=”apple-touch-icon” sizes=”180×180″ href=”/apple-icon-180×180.png”>
<link rel=”icon” type=”image/png” sizes=”192×192″ href=”/android-icon-192×192.png”>
<link rel=”icon” type=”image/png” sizes=”32×32″ href=”/favicon-32×32.png”>
<link rel=”icon” type=”image/png” sizes=”96×96″ href=”/favicon-96×96.png”>
<link rel=”icon” type=”image/png” sizes=”16×16″ href=”/favicon-16×16.png”>
<link rel=”manifest” href=”/manifest.json”>
<meta name=”msapplication-TileColor” content=”#ffffff”>
<meta name=”msapplication-TileImage” content=”/ms-icon-144×144.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 faviconadd_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..
July 16, 2015 at 11:01 am #121578Tom
Lead DeveloperLead DeveloperDo 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.
-
AuthorPosts
- You must be logged in to reply to this topic.