ThemeShaper Forums » Thematic

[closed]

Add onload to body on homepage only

(4 posts)
  • Started 1 year ago by jhkoning
  • Latest reply from em hr
  • This topic is not resolved
  1. jhkoning
    Member

    Hi there,
    The subject pretty much says it all, but how would I add, say this;

    onload="MM_preloadImages('/images/png/better-dog.png')" class="home"

    For arguments sake, to the <body> tag for the homepage only?
    Any ideas GREATLY appreciated :)
    Thanks in advance,
    Jas

    Posted 1 year ago #
  2. jhkoning
    Member

    Hi there,
    I'm no further ahead with this - can anyone help me - please?
    Thanks in advance,
    Jas

    Posted 1 year ago #
  3. I haven't tried this but...

    The code for the body tag is in thematic\library\extensions\dynamic-classes.php

    So you could create an override for thematic_body() and insert your code to test whether the given page is the home page

    if (is_home() || is_front_page()) {...}

    and add the appropriate mark-up to the tag.

    Hope this helps...

    Posted 1 year ago #
  4. Please read this and come to then new ThematicTheme Forums for support.

    Posted 1 year ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.