I just opened my wheelie bin and a wasp flew out. What kind of sick person would throw a wasp in a bin? 1 day ago



Aug 10
24th

WordPress Plugins Updated


I’ve made changes to two of my WordPress plugins today…

Simple Draft List

Yes, I know I only changed this yesterday, but I’ve now made an improvement to the date ordering (otherwise scheduled posts would always appear at the top of the list, as they have a future date). Now it’s based on the last modification date, meaning that changing a draft will move it back to the top again.

YouTube Embed

I’ve added a  transparency option so that videos won’t cover up layers on your site. The original problem would only have affected some people, but it’s a worthwhile change (which I haven’t made switchable, but can do if there is a need to do so).

Thanks very much to Daniel at optincrusher for finding it, reporting it and even checking over my changes!


Share this on del.icio.us Digg this! Email this Share this on Facebook Share this on LinkedIn Send this page to Print Friendly Share this on Reddit Share it on StumbleUpon Tweet This!


Aug 10
23rd

Simple Draft List WordPress Plugin Updated


My WordPress plugin, Simple Draft List, has been updated.

Until now it’s been of use to display draft posts on your site. However, I’ve now added the feature to also include scheduled posts that have not yet been published. By default this feature is switched on but can be turned off via a new parameter.

As usual, all details can be found on the Simple Draft List page.


Share this on del.icio.us Digg this! Email this Share this on Facebook Share this on LinkedIn Send this page to Print Friendly Share this on Reddit Share it on StumbleUpon Tweet This!


Aug 10
22nd

The WordPress Loop


I often get asked about “the loop” in WordPress, as many of my plugins require knowledge of it for successful integration.

“The loop” is simply some WordPress code that handles the fetching of post or pages. Each WordPress theme has a number of files that handle different types of output – for instance, index.php is used for displaying a number of posts, page.php displays pages and single.php shows a single post. Each of these contains the code for the loop.

The first line is usually this…

<?php while (have_posts()) : the_post(); ?>

And the last line is usually…

<?php endwhile; ?>

Everything in between is the setting up and displaying of the post/page in question.

So, let’s use Simple Social Bookmarks as an example. You will probably want to put the function call for this just before that last line of the loop – that will it will be the last thing displayed after each post or page. However, you may want other content to appear first, in which case you will choose a different location between the above 2 lines to put it.

What I can’t tell you is exactly where you need to put the code – that’s entirely down to you and how you wish the output. Indeed, there’s no reason why, in the case of Simple Social Bookmarks, you have to put it in the loop – you could have one at the top of each page. Bear in mind, however, that if you put code outside of the loop then it may not be able to get certain information – in out example, you’d have to supply a URL, as normally this is supplied by the loop to indicate the current post/page.

I hope this makes sense. If not, you can read more about it at WordPress.org.



Share this on del.icio.us Digg this! Email this Share this on Facebook Share this on LinkedIn Send this page to Print Friendly Share this on Reddit Share it on StumbleUpon Tweet This!
63 queries in 1.083 seconds.