Usage Examples | MaxImage 2.0 Caution: This example is meant for expert users. Remember, with FillElement you can often accomplish an offset scheme very easily... just set your containing element where you want the images to be displayed. Because the first rule of Maximage 2.0 is to try to remain hands off and out of your way, the built in support for offsets have been dropped with version 2.0. This doesn't mean they aren't possible. With a little elbow grease they can still be accomplished (and are better). What I am doing with the below code is creating curtains / offsets that live in front of the slideshow. Once we have our curtains up, the slideshow is still resizing to the full window and we want to have it maximize within the viewable area... our window size minus our offsets. View Example
Paging and Custom WordPress Loops Last week I published two articles using custom loops. The first was about how to create a custom loop. The second was how to retrieve posts based on custom fields. I’d like to thank Aaron Harun from Anthology of Ideas for supplying the code used in this post. Paging, and why it doesn’t work with WP_Query The paging magic happens in a file called ‘link-template.php‘ in the ‘wp-includes‘ folder. Most themes have basic paging built in, with the help of two functions: next_posts_link and previous_posts_link. These functions, as well as several others, make use of a global variable called $wp_query. How to make paging work with a custom loop As Aaron mentioned, the paging functions rely on a global variable called $wp_query. In the example below, I’ll show how to display the last five recent articles with our own custom loop with paging intact. <h3>Recent Articles</h3><ul><? Notice in the query above that we have these parameters: $wp_query->query('showposts=5'.' <? The Full Code Conclusion Howdy!
Quick Wordpress Tip: Limiting Post Excerpt Word Count in your Wordpress themes - Cuppa UPDATE: A great alternative to the solution below is using the built in function wp_trim_words(); is was added in WordPress version 3.3.0. Check out the wordpress codex on this. Here is a quick tip that enables you to have more control over your post excerpts word count. Put this code snippet in your functions.php file (If you do not currently have a functions.php file in your theme you will need to create one). This code replaces your <? To choose the amount of words you would like to display all you need to do is change the second parameter of the limit_words function. Making a web page fit an iPhone screen I’ve made three simplified pages that demonstrate the problem and solution. The basic HTML on all three pages is the same, and looks like this: <body><div id="wrapper"><p>Some paragraphs here...</p><p>More text...</p></div></body> The first example is here. width: 600px; And, in common with many recommendations I’ve seen for getting websites to display properly on the iPhone, the page has this meta tag: This causes problems though, as the CSS’s set width seems to take precedence over that meta tag’s “width=device-width” and the page comes out too large. OK, so we need to fix something. If your webpage is narrower than 980 pixels, then you should set the width of the viewport to fit your web content. OK, so let’s try our same example page, with the same CSS, but with the viewport meta tag like this: Here’s the second example, with the new meta tag, and here’s how it looks, again in Safari on the left, and opened from the Home Screen on the right: That surprised me. max-width: 600px; Success!
jqPagination, a jQuery pagination plugin (obviously) Introduction jqPagination is a jQuery plugin that provides a newer method of pagination for your web site or application. Instead of displaying a list of page numbers like traditional pagination methods jqPagination uses an interactive 'Page 1 of 5' input that, when selected, allows the user to enter their desired page number. Download Fork on GitHub Here are a few key points: Design agnostic Customisable Degrades beautifully Super simple to integrate with your app / site Uses jQuery... who doesn't love jQuery?! Demo It's oversized too, so you can try it when you're drunk! Show / hide event log: Installation Installation is super easy, for a basic setup you'll need the following HTML: And now we'll need to initialise the plugin against our HTML: Customisation jqPagination is built to be basic, but it does have a couple options and callbacks for customisation. Options current_page - option, default: 1 Sets the current page, can also be set using the current-page data attribute on the input element.
tubular, a YouTube Background Player jQuery Plugin | Sean McCambridge Design Video controls:Play | Pause | Volume Up | Volume Down | Mute Tubular is a jQuery plugin that lets you set a YouTube video as your page background. Just attach it to your page wrapper element, set some options, and you're on your way. $(page content wrapper element).tubular(options); Tubular's hello, world Assuming you're happy with the default options and you use a wrapper div with the id of wrapper, you simply attach to your wrapper div and specify the video you want to load: and Presto! A word of caution Tubular does not design your website for you. Options and defaults ratio: 16/9 // usually either 4/3 or 16/9 -- tweak as needed videoId: 'ZCAnLxRvNNc' // toy robot in space is a good default, no?
Waste Creative untitled