Showing posts with label WordPress. Show all posts
Showing posts with label WordPress. Show all posts

Tuesday, June 5, 2007

Installing TortiseSVN after Installing and Configuring WordPress

If you have WordPress installed and running successfully on a Windows server, then you install the TortiseSVN client, and then you export a block of code from Subversion, you may notice that the WordPress admin UI can no longer save edited presentation files. I found that the TortiseSVN install removed the IIS guest user account I had allowed on the themes directory, changing the permissions on that directory back to what they were originally, so it had to be added back to allow access.

Odd.

Monday, June 4, 2007

Getting a Count of Posts in The Loop in WordPress

I had a hard time finding this information. Here's how you can get a count of the number of posts in your current loop and the index of the current post you're accessing. post_count starts at zero and current_post starts at 1. In this example, I'm outputting a horizontal rule after all posts except the last one in the loop.

<?php
/* From http://codex.wordpress.org/The_Loop_in_Action */
if( ($wp_query->current_post + 1) < ($wp_query->post_count) )
{
echo("<hr />");
}
?>