Category Archives: Easy Coding for Wordpress

52 | Numbering Posts

g+

To give posts a continuous number in index pages or archives, try this little piece of code: Place it within the loop; condition: needs to be adjusted for any custom query.

Posted in Easy Coding for Wordpress | Tagged , | 3 Responses

49 | WordPress Post Thumbnails with Caption

g+

GREAT NEWS: since wp4.6, WordPress has just the right function for featured image captions: https://developer.wordpress.org/reference/functions/the_post_thumbnail_caption/ This is a tidying up of a WordPress support forum topic – nothing really that I came up with myself. The question is how to … capture it all … »

Posted in Easy Coding for Wordpress, WordPress | Tagged , , , , , | 5 Responses

46 | Styling the First Post Different

g+

How to style the first / last / latest / newest post in a WordPress site different? The default advice usually is to use a counter variable and a conditional statement to check for the first post in the loop; … Check the whole post »

Posted in Easy Coding for Wordpress, WordPress | Tagged , , , | 6 Responses

45 | Twenty Eleven – Sidebar and Other Adaptations for Hand-held Devices

g+

As the title says: how can you keep the sidebar on narrow screens such as the iPhone® or iPad® and set a minimum width for your site, using (a child theme of ) Twenty Eleven? The solution lies in the … Be responsive … »

Posted in Easy Coding for Wordpress, Tips & Tricks, Twenty Eleven, WordPress | Tagged , , , , | 31 Responses

42 | Posts in Columns – A New Twist on an Old Problem

g+

To organize posts into three columns (edit: semantically more correct would be to call it ‘three posts per row’ as this is the way the posts are organized), you first need to generate a column dependant css class for each … Check the whole post »

Posted in Easy Coding for Wordpress, Tips & Tricks, WordPress | Tagged , , , , , , , , , | 9 Responses

40 | Category Archive Navigation

g+

A simple next/previous category navigation for the category archive; particular useful if you use your categories to organise your blog, for instance your products, or photos… the above has a commonly used html structure to help with formatting.

Posted in Easy Coding for Wordpress, Tips & Tricks, WordPress | Tagged , , , , , | 4 Responses

39 | Adjusting Caption Frame Width

Adjusting Caption Frame Width
g+

WordPress captions come with a fixed frame which is set in the wordpress core file ‘media.php’ in the ‘wp-includes’ folder. The caption shortcode function adds a 5px wide space to the left and right of the image; and outputs the … Check the whole post »

Posted in Easy Coding for Wordpress, Tips & Tricks, WordPress | Tagged , , , , , | 2 Responses

37 | Easy Coding for WordPress: Posts in 3 Columns

g+

Sometimes it is the simple things that are hard to find. A basic structure to arrange posts into three columns: The minimal styles needed for the three columns: <div id=”column-wrap”> <?php $count = 0; while(have_posts()) : the_post() ?> <div class=”box<?php … Check the whole post »

Posted in Easy Coding for Wordpress, Tips & Tricks | Tagged , , , | 5 Responses

30 | Alternating Posts Backgrounds for Twenty Ten

g+

This is a short instruction how to add alternating styles to the post on the front page and in the archives of the wp3 default theme. Edit loop.php of Twenty Ten, and locate: Change this to: This will add the … Check the whole post »

Posted in Easy Coding for Wordpress, Tips & Tricks, WordPress | Tagged , , | 10 Responses