How to add iOS & fav icons to the theme?

Hook into wp_head in your functions.php file. add_action(‘wp_head’, ‘add_your_stuff’); function add_your_stuff() { ?> <link rel=”shortcut icon” href=”https://wordpress.stackexchange.com/questions/157869/<?php echo get_stylesheet_directory_uri();?>/favicon.ico” type=”image/x-icon” /> <link rel=”apple-touch-icon” href=”<?php echo get_stylesheet_directory_uri();?>/apple-touch-icon.png” /> <link rel=”apple-touch-icon” sizes=”57×57″ href=”<?php echo get_stylesheet_directory_uri();?>/apple-touch-icon-57×57.png” /> <link rel=”apple-touch-icon” sizes=”72×72″ href=”<?php echo get_stylesheet_directory_uri();?>/apple-touch-icon-72×72.png” /> <link rel=”apple-touch-icon” sizes=”76×76″ href=”<?php echo get_stylesheet_directory_uri();?>/apple-touch-icon-76×76.png” /> <link rel=”apple-touch-icon” sizes=”114×114″ href=”<?php echo get_stylesheet_directory_uri();?>/apple-touch-icon-114×114.png” /> … Read more

favicon and multi site

I would use a rewrite to map requests for /favicon.ico to /icons/example.com.ico: RewriteCond %{REQUEST_URI} ^/favicon\.ico RewriteCond %{SERVER_NAME} ^(www\.)?([a-z0-9]+) RewriteCond %{DOCUMENT_ROOT}/icons/%2.ico -f RewriteRule . /icons/%2.ico [L] Note the regex for line #2 depends on your set-up – is each website its own domain, or a subdomain/subdirectory of a primary domain? I would also place a default … Read more

How to change in customizer the “site identity” tab required capabilities

This is how I’ve interpreted from the wordpress docs at least. Originally these settings were made with add_setting and it is where the capability was originally set. Fortunately, we can use get_setting to change that value. It seems to work very well for your case. function wpseo_206907_add_back_customizer_controls_for_not_admins( $wp_customize ) { $wp_customize->get_setting( ‘blogname’ )->capability = ‘edit_theme_options’; … Read more

Check if Favicon is set in Customizer

WordPress saves the Favicon as site_icon in the options table holding the attachment post ID. What you could do is something like this: if( false === get_option( ‘site_icon’, false ) ) { // Show favicon } Where get_option() will hit the default ( we provide as the 2nd parameter ) false IF the site_icon does … Read more

Conditional Logic to Check for Site Icon

There exists a special function to check if the site icon is set, namely the has_site_icon() function. So you could try: add_action( ‘wp_head’, ‘wpse_default_site_icon’, 99 ); add_action( ‘login_head’, ‘wpse_default_site_icon’, 99 ); function wpse_default_site_icon() { if( ! has_site_icon() && ! is_customize_preview() ) { // your default icons here } } The case when the site icon … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)