Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7627733
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T05:29:58+00:00 2026-05-31T05:29:58+00:00

Basically, all I would like to do is to make this a little cleaner

  • 0

Basically, all I would like to do is to make this a little cleaner so the page loads quicker, is there a way to do this?

My head code is below:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en-US" xml:lang="en-US">
<head profile="http://gmpg.org/xfn/11">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Steve A Tattoo Artist</title>
<link rel="stylesheet" href="http://www.steveatattooartist.com/wp-content/themes/blue-and-grey/style.css" type="text/css" media="screen" />
<link href='http://fonts.googleapis.com/css?family=EB+Garamond' rel='stylesheet' type="text/css">
<!--[if lt ie 8]><link rel="stylesheet" href="http://www.steveatattooartist.com/wp-content/themes/blue-and-grey/styles/ie7.css" type="text/css" /><![endif]-->
<!--[if lt ie 7]><link rel="stylesheet" href="http://www.steveatattooartist.com/wp-content/themes/blue-and-grey/styles/ie6.css" type="text/css" /><![endif]-->
<link rel="pingback" href="http://www.steveatattooartist.com/xmlrpc.php" />

<!--DEMO CSS LINKS-->
<link href="http:/www.steveatattooartist.com/wp-content/themes/blue-and-grey/demo.css" rel="stylesheet" type="text/css"/>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js" type="text/javascript"></script>

<!--FANCY BOX REFS-->
<script type="text/javascript" src="/fancybox/jquery.fancybox-1.3.4.pack.js" type="text/javascript"></script>
<link rel="stylesheet" href="/fancybox/jquery.fancybox-1.3.4.css" type="text/css" media="screen" />

<!--GALLERIA-->
<script src="/galleria/galleria-1.2.6.min.js"></script>
<script src="/galleria/themes/classic/galleria.classic.min.js"></script>
<script>Galleria.loadTheme('/galleria/themes/classic/galleria.classic.min.js');</script>

<!--FANCY BOX JAVA-->
<script>
jQuery(document).ready(function() { 
/* This is basic - uses default settings */
$("a#single_image").fancybox();

/* Using custom settings */
$("a#inline").fancybox({
    'hideOnContentClick': true
});

/* Apply fancybox to multiple items */  
$("a.group").fancybox({
    'transitionIn'  :   'elastic',
    'transitionOut' :   'elastic',
    'speedIn'       :   600, 
    'speedOut'      :   200, 
    'overlayShow'   :   false
});
});
</script> 

<!--STEVE A DIV-->

<script>
jQuery(document).ready(function() { 
$("#firstpagename, #firstpagename2").click(function () {
$("div#white").toggle();
$("div#v2black, div#v3black").hide();
});

$("#secondpagename, #secondpagename2").click(function () {
$("div#v2black").toggle();
$("div#white, #v3black").hide();
});

$("#thirdpagename, #thirdpagename2").click(function () {
$("div#v3black").toggle();
$("div#white, #v2black").hide();
});

$(".toggle").click(function(){
      $(".toggle").hide();
      $(this).toggle();
});

});
<!--MAIN TOP NAV SCROLLING-->

$(window).scroll(function() {
    if ($(this).scrollTop() >= 591) {
        $(".altstevenav:hidden").show();
    }
    else {
        $(".altstevenav:visible").hide();
    }
});

$(window).scroll(function() {
    if ($(this).scrollTop() >= 591) {
        $(".topwhiteborder:hidden").show();
    }
    else {
        $(".topwhiteborder:visible").hide();
    }
});
</script>
<!--END OF DEMO CSS LINKS-->

<link rel="alternate" type="application/rss+xml" title="Steve A Tattoo Artist &raquo; Feed" href="http://www.steveatattooartist.com/?feed=rss2" />
<link rel="alternate" type="application/rss+xml" title="Steve A Tattoo Artist &raquo; Comments Feed" href="http://www.steveatattooartist.com/?feed=comments-rss2" />
<link rel='stylesheet' id='jquery.fancybox-css'  href='http://www.steveatattooartist.com/wp-content/plugins/fancy-box/jquery.fancybox.css?ver=1.2.6' type='text/css' media='all' />
<script type='text/javascript' src='http://www.steveatattooartist.com/wp-includes/js/jquery/jquery.js?ver=1.7.1'></script>
<script type='text/javascript' src='http://www.steveatattooartist.com/wp-content/plugins/fancy-box/jquery.fancybox.js?ver=1.2.6'></script>
<script type='text/javascript' src='http://www.steveatattooartist.com/wp-content/plugins/fancy-box/jquery.easing.js?ver=1.3'></script>
<script type='text/javascript' src='http://www.steveatattooartist.com/wp-includes/js/comment-reply.js?ver=20090102'></script>
<link rel="EditURI" type="application/rsd+xml" title="RSD" href="http://www.steveatattooartist.com/xmlrpc.php?rsd" />
<link rel="wlwmanifest" type="application/wlwmanifest+xml" href="http://www.steveatattooartist.com/wp-includes/wlwmanifest.xml" /> 

<meta name="generator" content="WordPress 3.3.1" />
<link rel='canonical' href='http://www.steveatattooartist.com/' />
<script type="text/javascript">
    jQuery(document).ready(function($){
        var select = $('a[href$=".bmp"],a[href$=".gif"],a[href$=".jpg"],a[href$=".jpeg"],a[href$=".png"],a[href$=".BMP"],a[href$=".GIF"],a[href$=".JPG"],a[href$=".JPEG"],a[href$=".PNG"]');
        select.attr('rel', 'fancybox');
        select.fancybox();
    });
</script>
    <style type="text/css">.recentcomments a{display:inline !important;padding:0 !important;margin:0 !important;}</style>

I figured this isn’t as neat as it should be and can be tidied up! Any help is appreciated…

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T05:29:59+00:00Added an answer on May 31, 2026 at 5:29 am

    You can bring all your JS into a single script:

    <script type="text/javascript">
    Galleria.loadTheme('/galleria/themes/classic/galleria.classic.min.js');
    
    jQuery(document).ready(function() { 
      /* This is basic - uses default settings */
      $("a#single_image").fancybox();
    
      /* Using custom settings */
      $("a#inline").fancybox({
        'hideOnContentClick': true
      });
    
      /* Apply fancybox to multiple items */  
      $("a.group").fancybox({
        'transitionIn'  :   'elastic',
        'transitionOut' :   'elastic',
        'speedIn'       :   600, 
        'speedOut'      :   200, 
        'overlayShow'   :   false
      });
    
      // STEVE A DIV
      $("#firstpagename, #firstpagename2").click(function () {
        $("div#white").toggle();
        $("div#v2black, div#v3black").hide();
      });
    
      $("#secondpagename, #secondpagename2").click(function () {
        $("div#v2black").toggle();
        $("div#white, #v3black").hide();
      });
    
      $("#thirdpagename, #thirdpagename2").click(function () {
        $("div#v3black").toggle();
        $("div#white, #v2black").hide();
      });
    
      $(".toggle").click(function(){
        $(".toggle").hide();
        $(this).toggle();
      });
    
    
      // MAIN TOP NAV SCROLLING
    
      $(window).scroll(function() {
        if ($(this).scrollTop() >= 591) {
          $(".altstevenav:hidden, .topwhiteborder:hidden").show();
        }
        else {
          $(".altstevenav:visible, .topwhiteborder:visible").hide();
        }
      });
    
      var select = $('a[href$=".bmp"],a[href$=".gif"],a[href$=".jpg"],a[href$=".jpeg"],a[href$=".png"],a[href$=".BMP"],a[href$=".GIF"],a[href$=".JPG"],a[href$=".JPEG"],a[href$=".PNG"]');
      select.attr('rel', 'fancybox');
      select.fancybox();
    });
    
    </script>
    

    You could also combine all your JS libraries (fancybox, galleria, etc.) into a single libraries.js file. And, of course, move the above JS into an external scripts.js file.

    Also, you’re calling jquery twice, and fancybox twice, so should probably remove one instance of each.

    I’m not sure how much WordPress will allow you to optimize, but reducing the number of JS and CSS files would be beneficial. Best practice, you’ll want a call to jquery, a libraries.js and a scripts.js, with no other JS (either external or inline).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Basically, I would like to decode a given HTML document, and replace all special
Basically all pages on this site I am building cannot be accessed when the
I'd like to implement mod_rewrite to put my site into maintenance. Basically all IP
Is there any way to make Apache to read PHP documents from RAM? I'm
Basically I would like some help on how to implement my idea. Any direction
I need to optimize this code. Any suggestions to make it go faster, please
I have some code that looks like this (I left out the parts that
I'm looking to parse some CXML in PHP...basically all I'm looking to get the
For instance, I know that basically all languages that are object oriented based are
My goal is to get various SEO-relevant information for various sites. Basically all the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.