Archive

Archive for the ‘Code Snippets’ Category

Fix WordPress search widget (x)html validation errors

December 14th, 2009 No comments

As it turns out, the standard WordPress issued search widget generates xhtml validation errors, by using the form role keyword.

For reason way beyond me, WordPress staff can find more time tracking the issue, changing it to a “future release” milestone, then decide to change the status from “new” to “closed”, set the resolution to “wontfix” (what a great resolution!), and then remove the milestone “Future Release”, and add the bold comment: “we’ll reopen if/when we’re interested.” source: WordPress Trac

I’m sure it must have been easier to remove the erroneous code: role="search" from the function that generates the search widget.

Here’s a quick trick to avoid these validation errors

Create your own search form

By creating your own searchform.php, you override the one WordPress uses by default, so it’s an easy fix. Using a text editor, like notepad, create a new file, and simply insert the following code:

[php]<form method="get" class="search-form" id="search-form" action="<?php bloginfo( ‘home’ ); ?>/">
<div>
<label class="screen-reader-text" for="s"><?php _e(‘Search for:’); ?></label>
<input class="search-text" type="text" name="s" id="search-text" value="<?php _e(‘Search this site’); ?>" />
<input class="search-submit" type="submit" name="submit" id="search-submit" value="<?php _e(‘Search’); ?>" />
</div>
</form>
[/php]

then save this file in your theme folder, and name it searchform.php.

From now on, your custom searchform will be used by the widget, and there will be no more validation errors.

Page template for iCompany without a grey bar

October 18th, 2009 9 comments

As requested in this post on the iThemes support forum, here are the instructions to create a page template for the iCompany Theme series by iThemes (these instructions will most likely work for iCar and iRealEstate as well). This template will not have the grey bar and the featured area, and the main content will expand to the right until the right tabber sidebar.

Read more…

Widgets in Flexx

September 20th, 2009 No comments

There is some confusion about the widgets used in Flexx themes. I will try to explain what the standard setup is.

Initially, Flexx was shipped without the additional Page Templates. Once these were implemented, we felt that we could increase functionality, by creating separate widget sections for these pages. That is when the Page widgets where created.
Read more…

Categories: iThemes Tags: ,

bSocial Page without sidebars

June 7th, 2009 No comments

Here are the instructions to create a landing page without sidebar and (optionally) the footer blocks (about and navigation) for iThemes‘ bSocial theme.

Read more…