Inspirational Art on Silk

one million dollars, copyright silkandart
one million dollars, copyright © silkandart a source of inspirational art on silk

Good Feng Shui – an auspicious symbol of wealth – one million dollars.

An original silk painting by SilkAndArt.com; a nice must-have feature for any office and home.

Silk & Art provides individual artwork on silk, as well as wearable inspired art.

‘Silk & Art embodies beauty and luxury combined in exquisite, handpainted silk fabric.’

More-Than-Zebra style wordpress loop

to start, i would like to express my thanks and gratitude to all the volunteers in the wordpress forum who patiently and freely give their time and attention, and share their knowledge and experience with all the users coming with questions and problems about their wordpress installation and modifications.
a great community.

lists or posts styled with alternating color backgrounds, for instance, can inprove the readability of blogs.

most themes and the standard wordpress installation are not offering this feature.
however, it is easy to implement, when you know how.

for example we could give alternating posts within the ‘wordpress loop’ a different extra class (‘odd’ or ‘even’) which can then be used with css.
to begin with, we introduce a counter ($c = 0;) before the loop, increment it inside the loop ($c++), and generate a class depending on the number of the counter by checking the modulus 2 of the number ($c % 2 – modulus is the remainder of the division):

<?php $c = 0 ; ?>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<?php $c++;
if( $c % 2 == 0 ) $extra_class = ' even';
else $extra_class = ' odd'; ?>
<div class="post <?php echo $extra_class; ?>">
<!--typical stuff in the loop-->
</div>
<?php endwhile; ?>
<?php else : endif; ?>

the class ‘odd’ or ‘even’ can be used in the style.css to create different background colors, alignments, margins, paddings, font-styles – no limits.

the most basic application of this method with a counter is how to style the first post in the loop different (only showing the logic part of the code):

<?php $c++;
if( $c == 1 ) $extra_class = ' first';
else $extra_class = ''; ?>

to make it more interesting, the next example is to create three different styles and a special style for the last post on the page.
we can get the number of the last post with

$wp_query->post_count 

The structure is the same, the main difference is in the ‘if, elseif, else’ logic:

<?php $c++;
if( $c == $wp_query->post_count ) $extra_class = ' last';
elseif( $c % 3 == 0 ) $extra_class = ' three';
elseif( $c % 3 == 2 ) $extra_class = ' two';
elseif( $c % 3 == 1 ) $extra_class = ' one';
?>

you can extend this method to create any number of cyclic classes.

EDIT: a new way of adding any number of recursive css classes – without counter variable, using the $wp_query->current_post of a default loop:

$extra_classes = array('one','two','three','four','five');
$extra_class = $extra_classes[$wp_query->current_post%count($extra_classes)];
echo $extra_class;

END OF EDIT

and you can use it in any situation in your wordpress templates, where you loop through some output – lists, foreach, for, while, posts, comments, …

special thanks to @esmi who dared venturing into the realm of more than two alternating styles, and who inspired me to post this article.

WP Kubrick default theme in 3 columns

Part of my time, I am spending designing and troubleshooting wordpress themes.

3 column kubrick theme

This is my latest ‘hack’, turning the default theme that comes with every wordpress installation, into a 3 column version, with equal sized left and right sidebar columns, all dynamic and widget ready.

All functions of the default theme are fully preserved. You can still modify the header colours from within the dashboard.

All files and graphics zipped for download. A great start for learning to mod your own theme.

At last a ‘default’ wordpress theme that fills the width of my laptop’s monitor 😉

Update: horizontal page navigation below the header included.

To activate it, edit header.php and  remove the commenting where indicated.

Water Filter Benefits

All processes within your cells are depending on water in one way or another. Also, your bodies are made to two-thirds out of water. So, it is no wonder that you depend on a constant supply of drinking water, and that dehydration can cause all sorts of illnesses or diseases, or can make you feel bad.
Drinking enough clean pure water
every day is so important to your health that one doctor wrote a whole book about it: ‘Your Body’s Many Cries for Water’ by Dr. F. Batmaghelidj.

Disclaimer: This article is not designed to provide medical advice or professional services. It is intended to be for educational use only. The information provided in this article is not a substitute for professional care and should not be used for diagnosing or treating a health problem or a disease. If you have, or suspect you may have, a health problem you should consult your doctor.

And obviously the quality and purity of your drinking water is of highest importance. You can imagine that drinking polluted water is not going to help your body to improve its health. I am going to emphasize the benefits of drinking pure or – as it is in reality – of purified filtered water by pointing out the negative health impact of common contaminants in tap water. Although water companies are regulated and have to control the quality of the water they supply to your home, there are limits in how the water companies have to treat the tap water, resulting in residual contamination. Continue reading “Water Filter Benefits”