2012-05-12 20 views
0

Wordpressの初心者として、私は現在、ネット上のリンクを基にして、ブログの投稿をすべて1つのページに表示します。残念なことにどのように私が定義リストを変更しても、フォーマットは機能していないようです。Wordpressのテンプレートで定義されていない定義リスト

次のコードが私のDLに応答しない理由が誰に見えますか?実際のページへのリンクが<dt>タグから周囲のdivを削除してくださいませんhttp://gameservertutorials.com/?page_id=2

<?php 
/* 
Template Name: Group Archives 
*/ 
?> 

<?php get_header(); ?> 

<div id="content"> 

    <?php 

     $cat_args = array(
      'orderby' => 'name', 
      'order' => 'ASC', 
      'child_of' => 0 
     ); 

     $categories = get_categories($cat_args); 

    ?> 

    <div class="post"> 

    <dl> 
     <?php foreach($categories as $category){ ?> 

       <div class="title"> 
         <dt><h2><a href="<?php echo get_category_link($category->term_id) ?>" title="<?php echo sprintf(__("View all posts in %s"), $category->name) ?>"><?php echo $category->cat_name ?></a></h2></dt> 
       </div> 

       <?php 
        $post_args = array(
         'numberposts' => 50, 
         'category' => $category->term_id 
        ); 

        $posts = get_posts($post_args); 

        foreach($posts as $post){ 
       ?> 

       <dd><a href="<?php echo the_permalink(); ?>" title="<?php echo the_title(); ?>"><?php echo the_title(); ?></a></dd> 

        <?php 
        } 
        ?> 

     <?php 
     } 
     ?> 
    </dl> 

    </div> 
</div> 

<?php get_sidebar(); ?> 
<?php get_footer(); ?> 

答えて

0

です:

<dt class="title"><h2><a href="<?php echo get_category_link($category->term_id) ?>" title="<?php echo sprintf(__("View all posts in %s"), $category->name) ?>"><?php echo $category->cat_name ?></a></h2></dt> 
+0

ませ運その上で、何も変更しませんでした。 –

関連する問題