Blog
Enqueueing JavaScript and CSS Files In Your WordPress Theme
When you’re building a theme, it is important to be able to use CSS stylesheets or JavaScript files where necessary. Sometimes you only want a script or stylesheet included on a specific custom post type or template, you might be adding some fancy JavaScript to modify your site, or you may just want to add different stylesheets for different media values. WordPress is not picky about allowing you to add additional files and it is well within your capabilities when written properly. In order to add files correctly, you’ll have to use the enqueue functions available within WordPress. Enqueuing the files this way ensures both full control and the ability to filter the HTML if needed. It is important to note that these files will only appear in your theme when you use wp_header() and wp_footer() within the head of your theme and just before the ending element for the
Let’s Build a Responsive Website Design
Beginning responsive website design using the Less framework Smart phones are no longer a growing commodity that you need to plan ahead for, they are in every user’s hands. Phones and tablets are many consumer’s go-to device for checking out a link on the fly. Your website will be viewed in both a phone’s browser, a tablet’s browser, and a desktop browser, and they will be viewed that way today, not tomorrow. It’s time to start building responsibly with responsive design. There are a multitude of available plugins, themes for every CMS, and different scripts that you can now use in order to complete this action without giving much thought to the work. The problem with this is, what happens when something goes wrong? Are you familiar enough with the code to fix these problems quickly? If your client calls you wondering why their tablet site isn’t working correctly, how
Multiple Background Images with CSS3
Utilizing multiple background images with CSS3 It has been a long-time dream of many web developers to have multiple images as a background for one div. There are numerous benefits to this, but one of my favorites is the repeating gradient with an image layered on top. Yes, you can achieve this by creating a whole bunch of extra <div>s and ensuring that the styling is correct in so many different places. Then, all you have to do is keep hoping against hope that one floating <div> or an absolute placement doesn’t mess everything out of whack. To get the job done a lot quicker and easier, simply use comma separated arguments: 12345.complicated_bg{ background-image: url("../image/one_img.jpg"), url("../image/bg_gradient.jpg"); background-position: center top, left top; background-repeat: no-repeat, repeat-x; } Notice that the image you want layered on top is positioned first in this. In order to place multiple images over one