Need help with Wordpress PHP Template

Discussion in 'PHP' started by Rezo, Aug 4, 2007.

  1. #1
    Hey all,

    I've developed a template and I've got a problem here:

    check : www.pspmeeting.com;

    See on the left there is :

    How am I suppose to fix it?

    Here's my full link code in sidebar.php:

     
    Rezo, Aug 4, 2007 IP
  2. .me

    .me Peon

    Messages:
    73
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #2
    In 2.2 (I think) wordpress merged the linkcategories table with categories

    Change this
    
    <?php
    $link_cats = $wpdb->get_results("SELECT cat_id, cat_name FROM $wpdb->linkcategories");
    foreach ($link_cats as $link_cat) {
    ?>
    <div class="widget_style" id="links_with_style">
    <div class="cats_head_bg">
    <h2 class="h3"><?php echo $link_cat->cat_name; ?></h2>
    </div>
    <ul>
    <?php get_links($link_cat->cat_id, '<li>', '</li>', '<br />', FALSE, 'rand', TRUE,
    TRUE, -1, TRUE); ?>
    </ul>
    </div>
    <?php } ?>
    Code (markup):
    With this

    	<?php
    	$link_cats = $wpdb->get_results("SELECT cat_id, cat_name FROM $wpdb->categories WHERE link_count!='0'");
    			foreach ($link_cats as $link_cat) {
    	?>
    <div class="widget_style" id="links_with_style">
    <div class="cats_head_bg">
    <h2 class="h3"><?php echo $link_cat->cat_name; ?></h2>
    </div>
    <ul>
    <?php get_links($link_cat->cat_id, '<li>', '</li>', '<br />', FALSE, 'rand', TRUE,
    FALSE, -1, TRUE); ?>
    </ul>
    </div>
    <?php } ?>
    Code (markup):
     
    .me, Aug 4, 2007 IP
    Rezo likes this.
  3. Rezo

    Rezo Well-Known Member

    Messages:
    4,183
    Likes Received:
    158
    Best Answers:
    0
    Trophy Points:
    135
    #3
    Man, thanks alot!

    You helped me, and it worked!

    *Rep points awarded*
     
    Rezo, Aug 4, 2007 IP