WordPress.org

Ready to get started?Download WordPress

Forums

customized drop-down menus malfunction (1 post)

  1. kalico
    Member
    Posted 6 years ago #

    I have a customized page which has stopped functioning correctly. It is a pastor's website, with drop-down lists of sermons, categorized (one drop down per category). It has stopped working about 2/3 of the way down, and I can't figure out what's wrong.

    http://www.timelessword.com/sermons

    You'll see it goes to the sermon series on Romans, then the series on James, the drop down malfunctions. What's odd is that the first part of the code below controls BOTH the Romans and the James sections because they are both New Testament category. (see the comments that say New Testament category ID 52)

    But there should also be another section below this, of Topical category sermons in a drop-down list. But it's completely missing in action.

    Any ideas?

    <!-- New Testament Cat ID 52 -->
    
    <?php
    
    $results = $wpdb->get_results("SELECT cat_ID, cat_name, category_nicename, category_description, category_parent FROM ".$wpdb->categories." WHERE category_description != '' AND category_parent = '52' ORDER BY cat_my_order ");
    
    ?>
    
    <?php foreach($results as $cat){ ?>
    
    <h3 ><a href="<?php echo get_category_link($cat->cat_ID); ?>">
    
    <?php echo $cat->cat_name; ?></a></h3>
    
        <select name="category" style="font-family: arial,verdana, sans-serif;font-size:9pt" onchange="MM_jumpMenu('parent',this,0)">
    
        <option value="">Sermon Series on <?php echo $cat->cat_name; ?></option>
    
        <?php query_posts('category_name='. $cat->cat_name . '&showposts=-1&order=ASC'); ?>
    
        <?php while (have_posts()) : the_post(); ?>
    
        <option value="<?php the_permalink(); ?>"><?php the_title(); ?> <?php echo post_custom('Subtitle'); ?>
    
    </option>
    
        <?php endwhile; ?>
    
        </select>
    
    <p><?php echo $cat->category_description; ?></p>
    
    <? }?>
    <!-- end NT -->
    
    <!-- topical set -->
    
    <?php
    $results = $wpdb->get_results("SELECT cat_ID, cat_name, category_nicename, category_description, category_parent FROM ".$wpdb->categories." WHERE category_description != '' AND category_parent = '38' ORDER BY cat_my_order ");
    ?>
    
    <?php foreach($results as $cat){ ?>
    <h3 ><a href="<?php echo get_category_link($cat->cat_ID); ?>">
    <?php echo $cat->cat_name; ?></a></h3>
    
        <select name="category" style="font-family: arial,verdana, sans-serif;font-size:9pt" onchange="MM_jumpMenu('parent',this,0)">
          <option value="">Sermon Series on <?php echo $cat->cat_name; ?></option>
          <?php query_posts('category_name='. $cat->cat_name . '&showposts=-1&order=ASC'); ?>
        <?php while (have_posts()) : the_post(); ?>
        <option value="<?php the_permalink(); ?>"><?php the_title(); ?> <?php echo post_custom('Subtitle'); ?></option>
        <?php endwhile; ?>
        </select></span>
    
    <p><?php echo $cat->category_description; ?></p>
    <? }?>
    
    <!-- end topical -->

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.