WordPress.org

Ready to get started?Download WordPress

Forums

My code doesn't work with 2.3 (6 posts)

  1. FionaGilbert
    Member
    Posted 6 years ago #

    Hi all,

    I am using the code below to display my categories but with 2.3 it appears not to work.

    Has table names been changed in 2.3 and if so why?

    Can anyone possibly help with this?

    <?php
    	/* Comma-delimited category list */
    	global $wpdb;
    	$thecats = $wpdb->get_results("SELECT * FROM $wpdb->categories WHERE category_count > 0 ORDER BY cat_name ASC");
    	$eor = count($thecats) - 1;
    	foreach($thecats as $thecat) :
    	?>
    	<a>cat_ID); ?>" title="<?php echo wp_specialchars($thecat->category_description); ?>"><?php echo $thecat->cat_name; ?></a><?php if($thecats[$eor] != $thecat) echo ', '; ?>
    	<?php endforeach; ?>

    Thanks

  2. savvy1405
    Member
    Posted 6 years ago #

    Yeah I'm having same problem, missing table wp_post2cat

  3. FionaGilbert
    Member
    Posted 6 years ago #

    Hi there,

    Is there anyone who can help with this?

    Thank you

  4. gaoer80
    Member
    Posted 6 years ago #

    Hello there,
    I have upgraded WP from 2.2.1 to 2.3 RC1 just now and I am getting this database error:
    WordPress database error: [Table 'd0031cb3.wp_post2cat' doesn't exist]
    SELECT * FROM wp_posts ,wp_post2cat WHERE post_status = 'publish' AND post_type = 'post' AND post_date_gmt <= '2007-08-01 14:43:25' AND ( ID = '169' )AND post_date_gmt <= DATE_SUB('2007-09-20 03:35:43', INTERVAL 30 DAY) AND post_ID = ID AND (category_ID = '1' OR category_ID = '19' ) ORDER BY rand() LIMIT 1
    I have only found this error on top of the cute puppies page and on my archive page. otherwise everything seems to be working properly. So, any idea of what I can do to get rid of that error?

  5. wpnety
    Member
    Posted 6 years ago #

    I'm currently setting up a review funny cat site based on WordPress where the users submit reviews of products. I would like to add some custom fields to the comment form that would then display in the user's comment.

    Update: I found a plugin called CForms that looks like it supports this feature.

    Does anyone have more experience using this plugin for comments?

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.