• Resolved Oxygen89

    (@oxygen89)


    Hi All,

    Recently, i noticed when my home page loads, at the place of logo it displays “Back home” text and then suddenly logo displays after loading of home page.

    I’m not sure, why this is happening? Next time, if you load the page, it displays correctly.

    Could anyone help me this weird issue.

    Thanks

Viewing 5 replies - 1 through 5 (of 5 total)
  • Theme Author presscustomizr

    (@nikeo)

    Hi,
    It seems that the alt attribute of the logo image is rendered before your image.
    You can get rid of this alt attribute with the following quick snippet :

    add_filter('tc_logo_img_display' , 'remove_logo_alt');
    function remove_logo_alt($html) {
      return str_replace('alt="Back Home"', '', $html);
    }

    Hope this helps!

    Thread Starter Oxygen89

    (@oxygen89)

    Hi Nikeo,

    This snippet resolved that “Back home” text problem. Now, after clearing the cache, means a fresh page, it displays a square type box of image and then suddenly logo come up.

    I’m not able to understand why recently this back home text came up?

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    @nikeo, Hi, as you’re aware these forum threads are read by a lot of people, you may want to also highlight the issues with taking away the alt attribute on images (highlighting accessibility).

    @oxygen89: The “alt”attribute is used for screen readers to tell people what the image contains. It is also what’s displayed when your image cannot load. More info in the Wikipedia article on alt.

    What is happening in your case is that the browser is taking a little longer than usual to display the image, so you are seeing the alt in its place first. Note that I just loaded your site and didn’t see this; the logo loaded immediately.

    Customizr by default sets the alt attribute to “Back Home”, which is where the link takes you. You could also set it to “our company home”, so that anyone on a slow connection will see that, instead. To do this, modify nikeo’s code above (in your child theme’s functions.php) to be:

    add_filter('tc_logo_img_display' , 'remove_logo_alt');
    function remove_logo_alt($html) {
      return str_replace('alt="Back Home"', 'Our company home', $html);
    }

    changing, of course, “Our company” for your company name.

    Thread Starter Oxygen89

    (@oxygen89)

    @electricfeet: May be because of slow connection, loading time of site was more, that’s why logo took time.

    Thanks a lot:-)

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Back Home displays before loading of logo’ is closed to new replies.