• I created apple icons and uploaded them to the images folder. I’ve placed the following code in the header file, but the icons are not working.

    <link rel="apple-touch-icon" sizes="57x57" href="images/apple-icon-57x57.png" />
          <link rel="apple-touch-icon" sizes="72x72" href="images/apple-icon-72x72.png" />
          <link rel="apple-touch-icon" sizes="114x114" href="images/apple-icon-114x114.png" />
          <link rel="apple-touch-icon" sizes="144x144" href="images/apple-icon-144x144.png" />

    Why is it not working? Do I have the code in the wrong spot?

Viewing 15 replies - 1 through 15 (of 20 total)
  • Never use relative urls in WordPress. Always use full (absolute) urls. What theme are you editing?

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Use absolute URLs to the images:

    /wp-content/themes/yourTheme/images/apple-icon-72x72.png

    Thread Starter SandyMcDonald

    (@sandymcdonald)

    I’m using the Andrina Lite theme. https://comfortclimateservice.com

    Do not edit the theme itself. First create a child theme for your changes.

    Thread Starter SandyMcDonald

    (@sandymcdonald)

    I’m working on creating the child theme, but in the meantime, can you help me understand why the code is not working?

    An absolute URL is the full file path to the image – i.e. it starts with https://example.com....

    BTW, making a child theme later is MUCH harder and you will have to redo a lot of work, so best to do it now before you waste more time.

    Thread Starter SandyMcDonald

    (@sandymcdonald)

    I’ve now made the URLs absolute, but the apple icons are still not working. Below is the code.

    <head>
            <meta charset="<?php bloginfo('charset'); ?>" />
            <title>
                <?php
                /*
                 * Print the <title> tag based on what is being viewed.
                 */
                global $page, $paged;
                wp_title('|', true, 'right');
    // Add the blog name.
                bloginfo('name');
    // Add the blog description for the home/front page.
                $site_description = get_bloginfo('description', 'display');
                if ($site_description && ( is_home() || is_front_page() ))
                    echo " | $site_description";
    // Add a page number if necessary:
                if ($paged >= 2 || $page >= 2)
                    echo ' | ' . sprintf(__('Page %s', 'andrina-lite'), max($paged, $page));
                ?>
            </title>
            <?php if (is_front_page()) { ?>
                <?php if (inkthemes_get_option('inkthemes_keyword') != '') { ?>
                    <meta name="keywords" content="<?php echo inkthemes_get_option('inkthemes_keyword'); ?>" />
                <?php } else {
    
                } ?>
                <?php if (inkthemes_get_option('inkthemes_description') != '') { ?>
    
                <?php } else {
    
                } ?>
                <?php if (inkthemes_get_option('inkthemes_author') != '') { ?>
                    <meta name="author" content="<?php echo inkthemes_get_option('inkthemes_author'); ?>" />
                <?php } else {
    
                } ?>
            <?php } ?>
            <link rel="profile" href="https://gmpg.org/xfn/11" />
            <link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
            <link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo('stylesheet_url'); ?>" />
          	<link rel="apple-touch-icon" sizes="57x57" href="https://comfortclimateservice.com/wp-content/themes/andrina=lite/images/apple-icon-57x57.png" />
          <link rel="apple-touch-icon" sizes="72x72" href="https://comfortclimateservice.com/wp-content/themes/andrina=lite/images/apple-icon-72x72.png" />
          <link rel="apple-touch-icon" sizes="114x114" href="/wp-content/themes/andrina=lite/images/apple-icon-114x114.png" />
          <link rel="apple-touch-icon" sizes="144x144" href="/wp-content/themes/andrina=lite/images/apple-icon-144x144.png" />
            <?php
            /* Always have wp_head() just before the closing </head>
             * tag of your theme, or you will break many plugins, which
             * generally use this hook to add elements to <head> such
             * as styles, scripts, and meta tags.
             */
            wp_head();
            ?>
        </head>
    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    I’m pretty sure there’s no equal symbol in your theme name. Amend that.

    Also, why have you disabled right click?

    Edit: WPyogi, I literally laughed out loud.

    This doesn’t seem to be a working file path:

    https://comfortclimateservice.com/wp-content/themes/andrina=lite/images/apple-icon-57×57.png

    Maybe check on that equals sign in the theme name? And two of the file paths are still not absolute.

    Also, do you have right-click disabled? EDIT – LMAO :)!

    Thread Starter SandyMcDonald

    (@sandymcdonald)

    What is disabling right click? I just added the link code for the apple icons.

    Thread Starter SandyMcDonald

    (@sandymcdonald)

    I’m following the directions in the child theme article above. So far, I’ve created the folder and added the style.css with the code to call the parent style.css.

    Now, for some reason, my menu is not displaying properly. It is ignoring the labels.

    I haven’t added anything else to the file yet.

    Yep, you have to recreate theme options in the child theme – they don’t carry over – just like any other new theme. (That’s why doing it sooner is better :).) But if you are using a custom menu, selecting it in the menu screen should bring it back.

    Thread Starter SandyMcDonald

    (@sandymcdonald)

    In addition, a page that is not included in the menu is now appearing in the menu. This is very strange.

    Thread Starter SandyMcDonald

    (@sandymcdonald)

    That fixed the menu. I did not notice no menu was selected in the screen when I made the change.

    Also, the apple icons are now appearing now that I added the full path and corrected the typo.

    Thank you very much for your help.

    I still don’t know where in the code you guys are talking about the right click being disabled. I do have a copywrite plugin installed. What code should I correct for right click problem?

Viewing 15 replies - 1 through 15 (of 20 total)
  • The topic ‘Apple Icons Not Working’ is closed to new replies.