Load Javascript on Specific WordPress Pages
<?php if (is_page(array(42, 'about-me','About Me And Joe'))) { ?> stuff here <? } else { ?><? } ?> Source: WordPress Forums
View ArticleCalling Google JQuery Library in Header or Footer
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script>
View ArticleWordPress Template Directory function to call CSS or JS file
CSS: <link rel="stylesheet" type="text/css" href="<?php bloginfo('template_directory'); ?>/css/style.css" /> JS: <script type="text/javascript" src="<?php...
View ArticleHow to Install FancyBox Lightbox on a WordPress Website
1. Paste this code after the opening tag and before the closing tag in your header.php file. (Just after the lines that start with “” is a good spot.) <link rel="stylesheet" type="text/css"...
View ArticleTestimonials Styling with Quotation Mark Image for Pages
div.quote-begin { background: url("images/quote-begin.png") no-repeat scroll 0 0 transparent; float: left; height: 30px; margin-top: -10px; width: 40px; } div.testimonials-page p { margin-bottom:...
View ArticleJquery Slideout Div
#slide-down is the Button that triggers the slide-out div. .cities-dropdown is the div that drops down, magically, out of nowhere. The “body” click function is to trigger the .slideToggle event if the...
View ArticleInset Box Shadow
Nice inset box shadow values. box-shadow: 0 1px 15px rgba(0, 0, 0, 0.7) inset; -webkit-box-shadow: 0 1px 15px rgba(0, 0, 0, 0.7) inset; -moz-box-shadow: 0 1px 15px rgba(0, 0, 0, 0.7) inset;
View ArticleUse Arrows Keys to Trigger Jquery Slider
This code is from jqueryfordesigners.com. It uses the current item class to find the next or previous list item, and trigger a click event on that item. If the current class is on the link tag itself,...
View ArticleGet Custom Fields Outside the Loop
<?php global $wp_query; $postid = $wp_query->post->ID; echo get_post_meta($postid, 'customField', true); ?> From: WPRecipes
View ArticleMedia Queries Template for Browser Window Adjustments
CSS /* 320px to 420px */ @media screen and (min-device-width : 320px) and (max-device-width : 480px) { } /* below 600px */ @media screen and (max-width: 600px) { } /* 600px to 799px */ @media screen...
View Article