CSS3 Is together with Canvas one of the more exciting elements of web design. With this post we want to showcase some awesome techniques to improve your design with the help of CSS3. [Read more…]
WordPress Snippet: More Posts in the Same Category
From an SEO perspective there’s no point in displaying the exact same content in every single sidebar on your WordPress site. A great piece of snippet offers a great solution on a very dynamic single post sidebar. Just to be clear, this snippet only works if you use just use one category per post for your posts.
[php]
More posts from this category
-
term_id);
- term_id);?>” title=”See all posts in the category name; ?>”>Archive for ‘name; ?>’ Category »
foreach($posts as $post) : ?>
[/php]
As you can see this snippet does two things. First, it displays the seven latest posts of the category used for the post you’re currently reading. Secondly, it shows a link to the category archive used. A great way to get your readers to stay longer on your blog. While you’re at it, consider styling those category views using WordPress category templates.
You need these two too
If your theme currently doesn’t have a separate single post sidebar you should have a look at the Widget Logic plugin. It allows you to specify which widget should be displayed on which view. Also, you will need plugin that will allow you to use php inside a widget like Exec PHP.
Top 5 Sites for Free Scripts
I’ve always considered myself more of a web designer than a programmer- so I always have my eye out for cool, free scripts to make my life easier. Here are my current top five places online to find free scripts of every type- PHP, Javascript, etc. However, this list is always changing. Much like the Internet… which is why we love it so much, yes?
Hot Scripts
The big daddy of free script sites, I admit that Hot Scripts is nearly always my first stop in a search for scripts. It’s well-organized, with thousands of scripts. Among the best things about Hot Script, IMHO, are the User Reviews and Ratings on scripts, and the ability to see licensing information immediately. Visit Hot Scripts »
SitePoint’s Scripts & Online Services Forum
When I was getting started in web development, I spent a lot of time in SitePoint’s forums. Their “Scripts & Online Services” discussion board is one of the best places to find scripts, both paid and free, as well as many excellent coders available for hire. Visit SitePoint’s Script & Online Services Forum »
Dynamic Drive
Dynamic Drive is one of the aforementioned places I can spend hours at, just looking through the various offerings. This is where I go when I need a quick- usually javascript- solution, either to use immediately or to get ideas from. Visit Dynamic Drive »
Google Code
I like to think of Google Code as a simpler to use, easier to understand SourceForge. More than just a collection of scripts, this is a code repository, featuring both full scripts and “bits” of code, covering everything from Python to Ajax to Rails. Because it’s from Google, its search engine is lightning fast, which is wonderful when you’re on a tight deadline. Visit Google Code »
Snipplr
Like Google Code above, Snipplr is a repository- of snippets. Snippets- bits of code that can be copied and pasted in seconds- are awesome already, and Snipplr makes them even simpler to navigate. No unnecessary fluff here, just straight-on, easy to use code. Visit Snipplr »
Where do you search for scripts and code?
How to Integrate Google Buzz with WordPress
I’ve only very recently embraced Google Buzz, which may or may not be Google’s answer to Twitter, but feels more like Google Reader + Google Talk + Facebook to me. Of course, the single best thing about Google Buzz is that it’s built into my Gmail, which means that I don’t need to sign up for anything new, import contacts, etc. It just works. And because I’m always have Gmail open, that’s a good thing.
Integrating Google Buzz with your WordPress blog is a good way to get more exposure for your posts, and ultimately increase your blog’s traffic. Here are three ways to do it:
WP Google-Buzz
If you want to use a plug-in, the WP Google-Buzz plugin is my first choice. It’s easy to install, and as you can see from the screenshot above, includes a lot of options, such as global show or hide, and the ability to open Buzz in a pop-up window or a new browser window (the default).
Intense Debate Plug-In
Already using Intense Debate to power your comments? Then there’s no need for you to install a separate plug-in to use Google Buzz- simply turn it on in the Intense Debate plug-ins list. If you’re not running Intense Debate and would like to, here’s a short video tutorial on how to get started.
Manually
If you’d rather not use a plug-in, or want to manually add a Google Buzz link or button to your WordPress theme, here’s some code you can use:
<a href=’javascript:var%20b=document.body;var%20GR________bookmarklet_domain="http://www.google.com";if(b&&!document.xmlVersion){void(z=document.createElement("script"));void(z.src="http://www.google.com/reader/ui/link-bookmarklet.js");void(b.appendChild(z));}else{}’>Add to Google Buzz »</a>
You’ll want to use the code in the WordPress loop – and it should work in your index.php, single.php or page.php templates among others. Feel free to change the “Add to Google Buzz” text to something else, or replace with an image of your choice.
Do you use Google Buzz?
Horizontal Rules and How to Style Them
Oh, the <hr>. It’s one of those HTML tags that’s been around forever, but you never give much thought to. Until today.
<hr> stands for horizontal rule, and are a good choice when you have a lot of content on a single page. Using them can increase readability, by signifying to your reader that a new topic or section is about to begin- and visually, by giving the reader’s eyes a rest.
Yes, horizontal rules are a good thing, except that how they look relies mostly on the browser the website is being displayed in.
In the past, you could style <hr> tags with definitions such as align, size and width, but these are- thankfully- deprecated now, and so we turn to CSS.
Prettifying your <hr>s with CSS
First of all, you always want to close your <hr>s like so:
<hr />
There is no “open” tag, so think of this like a <br /> tag. It stands alone.
Here are some of the more common definitions you can use for styling:
- height : to adjust the rule’s thickness.
- width : the width of the rule. Use pixels or percentages.
- background : set the color of the rule.
- margin : to adjust the horizontal alignment of the rule.
For example, to get a rule like this:
add the following to your stylesheet:
hr {
height: 8px;
width: 500px;
background: teal;
border:0;
}
The possibilities, of course, are many- you can use background images, borders (you’ll want to use border-top for this), and for clearing previous floats.
Learn more about the <hr> tag at the w3.