Archive for the ‘WordPress’ Category

Wordpress: No Page comments

Tuesday, July 21st, 2009

It seems like the “Allow Comments” option on the “Add new page” screen does not work in wordpress.  Specifically, it does not work for the default theme Kubrick.

Allow comments option

Allow comments option

Seeing this option, it’s easy to assume this enables comments on your wordpress Pages, especially for the default theme. But unfortunately, this particular option in the admin page has no affect on the default Kubrick theme. To enable comments on your Page(s), you have to select a theme which includes them or modify your default Kubrick theme.

Default theme with page comments

To change your default theme, add the following line to /wp-content/themes/default/page.php

<?php
/**
 * @package WordPress
 * @subpackage Default_Theme
 */

get_header(); ?>

    <div id="content" class="narrowcolumn">

        <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
        <div class="post" id="post-<?php the_ID(); ?>">
        <h2><?php the_title(); ?></h2>
            <div class="entry">
                <?php the_content('<p class="serif">Read the rest of this page &raquo;</p>'); ?>

                <?php wp_link_pages(array('before' => '<p><strong>Pages:</strong> ', 'after' => '</p>', 'next_or_number' => 'number')); ?>

            </div>
        </div>
        <?php endwhile; endif; ?>
    <?php edit_post_link('Edit this entry.', '<p>', '</p>'); ?>

    <?php comments_template(); ?>
    </div>

<?php get_footer(); ?>

Additional References

http://wordpress.org/support/topic/246879

http://wordpress.org/support/topic/196788

Wordpress thumbnail generation disabled

Tuesday, June 23rd, 2009

No thumbnails in your wordpress? Read on…

I noticed last night that my wordpress is not generating thumbnails from uploaded images like it’s suppose to. You’ll noticed that the size options (thumbnail, medium, large) are all disabled except for the full size.

wordpress-size-options

After doing a lot of searching, I finally found out that in order for wordpress to generate thumbnails “by default”, you need to have GD library support for your php. It would have been nice if wordpress had documented that better.

The only reference I found was this:

http://wordpress.org/support/topic/235625

To be clear, wordpress does not generate thumbnails by default unless your php instance has GD support.

Install php gd library

For me, installing GD library was easy:

# yum install php-gd

Check for gd

To check if you have GD loaded in php:

# php -m
[PHP Modules]
bz2
calendar
ctype
curl
date
dbase
exif
ftp
gd
gettext
gmp
hash
iconv