35 | Front Page Comments on your WordPress Blog

Posted by alchymyth | Tips & Tricks,Wordpress | Monday 2 August 2010

You want to show the comments to the posts on the front page of your blog?
You want to allow visitors to your blog to leave a comment on the latest post without having to click on the comments link or the post title?
You think this should be straight forward and easy to do?
But far from it…
First step is to locate the template file that shows your front page: in most cases,
this is index.php (but … » read more »

33 | Automatically Shorten the Manual Excerpt

Posted by alchymyth | Tips & Tricks,Wordpress | Saturday 10 July 2010

When you are building or modifying a wordpress theme, you have the choice of either using ‘the_content()’ to show the full article, or ‘the_excerpt()’ to show a shorter version.
By default, the latter limits the output to the first 55 words of the post, and automatcally strips formatting and images.
To make things more flexible, the editor also allows you to add a manual excerpt that will have preference before the automatically generated one.
There is no default … » read more »

31 | Adsense in Content of Posts and Pages for wp3

Posted by alchymyth | Tips & Tricks,Wordpress | Wednesday 23 June 2010

A flexible way to add google adsense into posts and pages in your wordpress blog.
This appraoch uses shortcodes which are an underused technique of increasing the functionality of themes.
Through the formatting options in the shortcode, the text can flow around the adsense blocks similar as it would happen with inserted images.
Options for the alignment are ‘left’, ‘center’, ‘right’ – anything else will be treated as ‘none’.
The code that needs to be added to functions.php of … » read more »

28 | Defining the writing area of the dashboard editor

Posted by alchymyth | Tips & Tricks,Wordpress | Tuesday 18 May 2010

the first of my upcoming ‘tips and tricks’ – a handy function to style the editor area of your self-hosted wordpress blog or cms:
if you are working on a modern widescreen monitor, but want to restrict the wordpress editor area (your writing paper, so to speak) to the width as it will later show in your blog, here is a tip what to add to functions.php of your theme:
function custom_max_width_editor() {
echo '<style type="text/css"> textarea#content, #content_ifr … » read more »

27 | Highlight the post’s categories in the category list

Posted by alchymyth | Wordpress | Monday 17 May 2010

highlighting the categories of a post in single post view is a useful trick to allow the viewer to find related posts.
there are plugins available which extend the functionality of the standard category widget to do this.
sometimes, however, it can be desirable to have the same feature with a function that you can use like you would use ‘wp_list_categories();’ – exactly with the same arguments.
/* hi_list_categories() to highlight the current categories of a post in … » read more »

26 | Playing with columns – stacking posts in a grid

Posted by alchymyth | Wordpress | Sunday 11 April 2010

a different approach to ‘grid style’ – stacking the posts in a tightly ordered grid; to get a similar design as in http://www.creativedepart.com/ – ideal to use with thumbnails and excerpts:
(bare minimum code, without explanation, totally flexible and automatic)
<?php $num_cols = 4; // set the number of columns here
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1; // for pagination
$args = array(
'posts_per_page' => 16, // optional to overwrite the dashboard setting
'cat' => 0, // add any other … » read more »

Next Page »