Posts Tagged ‘code’

Author’s quick guide to Social Media Marketing, iPhone data plans explained, BP PR display ads, the useful 33% of Twitter users, jQuery for better columns

Monday, June 14th, 2010

These are my links for May 31st through June 14th:

Changing the default month or day for an embedded Google calendar

Thursday, May 14th, 2009

How to embed a public Google calendar on your page: Embed on your website

Want to change which month or day the calendar displays on load? I found the answer on this Mark Mail page. Just include date values in the parameter string like so:

...&ctz=America/Los_Angeles&dates=20090901%2F20120901

It also looks like you can pass other parameters to control color, etc.

How to show only your single latest post on your WordPress home page.

Tuesday, July 29th, 2008

Wordpress Settings > Reading - setting the number of posts per pageIn WordPress 2.x under Settings > Reading, you can set a number for “Blog pages show at most”.  This applies globally, however.  I discovered a method to make your home page to show only the latest post, while allowing all other blog pages to respect the “at most” number.

In index.php, just before the loop, I added the following line:

<?php query_posts('showposts=1'); ?>

Basically, that sets up a preemptive query and grabs only the latest post, rather than allowing the loop to query the latest “at most” number of posts.