Posts tagged ‘wordpress’

CSS Naked Day 2008

Monday, April 7th, 2008

I’ve signed up to participate in the third annual CSS Naked Day, which will be celebrated on April 9th! For the entire day, my site will be without style!

If this is the first time you’ve heard of CSS Naked Day, it was started by Dustin Diaz to promote Web Standards:

“This includes proper use of (x)html, semantic markup, a good hierarchy structure, and of course, a good ‘ol play on words. It’s time to show off your <body>”

Are you brave enough to strip naked for a day?

Note: Only my content delivered through WordPress will be “naked”, the rest will be left “fully clothed”.

SimpleModal Contact Form (SMCF) 1.1 Released

Thursday, March 13th, 2008

SMCF 1.1 includes the following changes:

  • Fixed image pre-loading to actually pre-load ;)
  • Added new effects on form open and close
  • Added a security feature
  • Added optional subject and cc sender form elements
  • Added common classes to form elements
  • Renamed all classes and ID’s to prevent collisions
  • Added WordPress translation ability on text elements (__() and _e() functions)
  • Upgraded to SimpleModal v1.1.1 and jQuery 1.2.3
  • Moved SimpleModal and SMCF JavaScript file loading to the footer

For more information and the download, please visit the SMCF WordPress Plugin Page.

SimpleModal Contact Form (SMCF) 1.0 Released

Sunday, January 6th, 2008

SimpleModal Contact Form (SMCF) is an Ajax powered modal dialog contact form for WordPress.

The project and all of the information about it is hosted on WordPress.org.

If you have any feedback regarding the plugin, please let me know.

SimpleModal v1.1 Released

Friday, January 4th, 2008

There are three new options and the handling of data has been revamped. For more details, including documentation, demos, tests and downloads, visit the project page.

I’m finishing up a WordPress plugin based on SimpleModal, which should be ready soon. The Contact link above is powered by the new WordPress plugin.

Conditional page/post navigation links in WordPress (redux)

Monday, November 19th, 2007

After more helpful input, I’ve decided to update my original solution.

Instead of overriding four WordPress functions and adding two new ones in my functions.php file, I have slimmed it down to just one:

/**
 * If more than one page exists, return TRUE.
 */
function show_posts_nav() {
	global $wp_query;
	return ($wp_query->max_num_pages > 1) ? TRUE : FALSE;
}

This function will tell me if there is more than one page…and if there is, I will show the posts navigation (next_posts_link and previous_posts_link). I updated my WordPress (index.php, archives.php and search.php) files with:

<?php if (show_posts_nav()) : ?>
<div class='navigation'>
	<span class='older'><?php next_posts_link('&laquo; Older Entries'); ?></span>
	<span class='newer'><?php previous_posts_link('Newer Entries &raquo;'); ?></span>
</div>
<?php endif; ?>

As for the single post next/previous links, I decided to remove the check because I’ll always have more than one entry.

Much cleaner and less code ;)

Conditional page/post navigation links in WordPress

Sunday, November 18th, 2007
Update: This post has been replaced with an updated version.

While creating a new theme for this site, I added some CSS styling around the page/post navigation links.

For example, in my index.php page, I have the following HTML/WordPress code:

<div class='navigation'>
  <span class='older'><?php next_posts_link('&laquo; Older Entries') ?></span>
  <span class='newer'><?php previous_posts_link('Newer Entries &raquo;') ?></span>
</div>

And the following CSS code:

.navigation {font-size:.7em; background:#353535; height:16px; margin:0 -16px 8px -16px; padding:8px 6px 0px;}
.navigation span {margin-top:-4px;}
.navigation .older {float:left;}
.navigation .newer {float:right;}

Everything looked great, until I brought up a page that did not have a previous or next link. The styled navigation div was still there, but there was nothing in it. So, I set out to conditionally display the navigation div if either a previous or next link existed.

Read the rest of this entry »

New site design

Wednesday, November 14th, 2007

I finally got around to updating the theme for this site. It was quite an adventure learning about WordPress Themes and its API. The more I use WordPress, the more I like it!

Thanks to my brother-in-law, Max, for helpful tips on my new logo and also to Michael Heilemann for his default WordPress theme, which I used as a reference.

As time allows, I’ll be adding content to the about, resume, projects and contact pages.

If you have any comments or criticism ( hopefully constructive ;) ) on the new site design, I’d like to hear them…

Configuring WordPress

Tuesday, October 9th, 2007

I’ve been playing with configuring WordPress (WP) for this site. After doing some research, I had a plan for how I wanted it to work. Basically, I wanted to use WP to manage my site (like a CMS) as well as for a blog.

After a lot of trial and error, I think I’ve achieved the effect I was looking for. I installed WordPress in the /blog directory. Copied the index.php and .htaccess file into / and edited index.php:

require('blog/wp-blog-header.php');

In wp-admin, under Options > General, I changed “WordPress address (URL)” to http://www.ericmmartin.com/blog and “Blog address (URL)” to http://www.ericmmartin.com. I then created 2 pages, one called Home and one called Blog. Lastly, under Options > Reading, I set the Front Page option to “A static page (select below)” and Home for the Front page and Blog for the Posts page.

Currently, I’ve installed the WP-Syntax, Akismet, Add Your Own Headers and Exec-PHP plugins.

The rest is still a work in progress, but so far, I’m happy with WordPress!