Adding a Favicon Via the Backend in October CMS
Ad
I want to create an file upload option for a favicon using the Theme Customization options: https://octobercms.com/docs/themes/development#customization
However, if I understand correctly, favcicons (and Apple Touch Icons) need to a) have a particular name and b) be located on the root directly (i.e., www.website.com/favicon.ico).
Is it possible to use the theme customization fileupload field and have the files uploaded to the root directory and given the names required to function as favicons and apple touch icons?
If so, any idea how?
Thanks.
Ad
Answer
Ad
For both favicon and Apple Touch icon you can declare a href attribute
<link rel="icon" type="image/png" target="_blank" rel="nofollow noreferrer" target="_blank" rel="nofollow noreferrer" href="http://example.com/myicon.png">
<link rel="apple-touch-icon" target="_blank" rel="nofollow noreferrer" target="_blank" rel="nofollow noreferrer" href="touch-icon-iphone.png">
<link rel="apple-touch-icon" sizes="152x152" target="_blank" rel="nofollow noreferrer" target="_blank" rel="nofollow noreferrer" href="touch-icon-ipad.png">
<link rel="apple-touch-icon" sizes="180x180" target="_blank" rel="nofollow noreferrer" target="_blank" rel="nofollow noreferrer" href="touch-icon-iphone-retina.png">
<link rel="apple-touch-icon" sizes="167x167" target="_blank" rel="nofollow noreferrer" target="_blank" rel="nofollow noreferrer" href="touch-icon-ipad-retina.png">
We may, alternatively, install this this free plugin: SEO Extension
Ad
source: stackoverflow.com
Related Questions
Ad
- → OctoberCMS Backend Loging Hash Error
- → "failed to open stream" error when executing "migrate:make"
- → OctoberCMS - How to make collapsible list default to active only on non-mobile
- → Create plugin that makes objects from model in back-end
- → October CMS Plugin Routes.php not registering
- → OctoberCMS Migrate Table
- → How to install console for plugin development in October CMS
- → OctoberCMS Rain User plugin not working or redirecting
- → October CMS Custom Mail Layout
- → October CMS - How to correctly route
- → October CMS create a multi select Form field
- → How to update data attribute on Ajax complete
- → October CMS - Conditionally Load a Different Page
Ad