WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] list categories not displaying in browser? (2 posts)

  1. gashface
    Member
    Posted 2 years ago #

    Ok I am working on making a sort of CMS out of wordpress, this is my first time making something so complex using wordpress. But I am essentially trying to list a text list of links to categorie's as a sort of sub navigation on category pages.

    I thought it'd be simple using the list categories function. I have used this in my code in it's simplest form to test it out. Weirdly the results can be seen quite clearly in the source and it has even moved the rest of my layout there as if it is there. But I cannot see it in the browser. Can anybody help me with this odd phenomenom, I thought it might simply be my CSS, but I can't fathom what would be causing it?

    Code of category.php

    <?php get_header(); ?>
    
    <div id="content">
    
    <div id="categorylist">
    <ul>
    <?php wp_list_categories( ); ?>
    </ul>
    </div>
    
    <div id="gridContainer">
    <?php
    $c = 1; //init counter
    $bpr = 3; //boxes per row
    if(have_posts()) :
    
    						$category_description = category_description();
    						if ( ! empty( $category_description ) )
    							echo apply_filters( 'category_archive_meta', '<div class="category-archive-meta">' . $category_description . '</div>' );
    
    while(have_posts()) :
    		the_post();
    		?>
    			<div class="post" id="post-<?php the_ID(); ?>">
    			<div class="postImage">
    			<a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>"><?php the_post_thumbnail('grid-post-image'); ?></a>
    <h1 class="title"><a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a></h1>
    <h2 class="tags">
    <?php echo strip_tags(get_the_tag_list('',', ','')); ?>
    </h2>
    <h3 class="date"><?php the_date('Y'); ?></h3>
    			</div>
    			</div>
    <?php
    if($c == $bpr) :
    ?>
    <div class="clr"></div>
    <?php
    $c = 0;
    endif;
    ?>
    <?php
            $c++;
    	endwhile;
    endif;
    ?>
    <div class="clr"></div>
    </div>
    
    <?php
    get_sidebar();
    get_footer();
    ?></div>
  2. gashface
    Member
    Posted 2 years ago #

    Nevermind simple css error. Well now don't I feel like a wally!

Topic Closed

This topic has been closed to new replies.

About this Topic