2016-04-13 23 views
1

Kategori adını, açıklamasını ve küçük resmini gösteren bir kategori sayfası oluşturmak istiyorum. Herhangi bir kategoriye tıkladığımızda, bir sonraki kategorideki mesajlarını göstermesi gerektiğinde, her kategori yayınlarına bağlanmalıdır.WordPress özel kategori sayfası nasıl oluşturulur

<?php get_header(); ?> 

<div class="container-wrap"> 

    <div class="container main-content"> 

    <div class="container"> 

       <h1 class="page-header"> 
       <?php echo category_description(); ?> 
       </h1> 

     <div class="row"> 

      <div class="col-md-4 portfolio-item"> 
       <a href="#project-link"> 
        <img src="<?php bloginfo('template_url'); ?>/img/700x400.png" alt="<?php echo get_the_title(); ?>" title="<?php echo get_the_title(); ?>" width="250" height="180" /> 
       </a> 
       <h3> 
       <a href="<?php echo get_category_link($category_id=65) ?>"> 
       <?php echo get_cat_name(65);?> 
       </a> 
       </h3> 
       <p><?php echo category_description(); ?></p> 
      </div> 

      <div class="col-md-4 portfolio-item"> 
       <a href="#project-link"> 
        <img src="<?php bloginfo('template_url'); ?>/img/700x400.png" alt="<?php echo get_the_title(); ?>" title="<?php echo get_the_title(); ?>" width="250" height="180" /> 
       </a> 
       <h3> 
       <a href="<?php the_permalink() ?>"> 
       <?php echo get_cat_name(68);?> 
       </a> 
       </h3> 
       <p><?php echo category_description(); ?></p> 
      </div> 

      <div class="col-md-4 portfolio-item"> 
       <a href="#project-link"> 
        <img src="<?php bloginfo('template_url'); ?>/img/700x400.png" alt="<?php echo get_the_title(); ?>" title="<?php echo get_the_title(); ?>" width="250" height="180" /> 
       </a> 
       <h3> 
       <a href="<?php the_permalink() ?>"> 
       <?php echo get_cat_name(70);?> 
       </a> 
       </h3> 
       <p><?php echo category_description(); ?></p> 
      </div> 



      </div> 

     <div class="row"> 

      <div class="col-md-4 portfolio-item"> 
       <a href="#project-link"> 
        <img src="<?php bloginfo('template_url'); ?>/img/700x400.png" alt="<?php echo get_the_title(); ?>" title="<?php echo get_the_title(); ?>" width="250" height="180" /> 
       </a> 
       <h3> 
       <a href="<?php the_permalink() ?>"> 
       <?php echo get_cat_name(67);?> 
       </a> 
       </h3> 
       <p><?php echo category_description(); ?></p> 
      </div> 

      <div class="col-md-4 portfolio-item"> 
       <a href="#project-link"> 
        <img src="<?php bloginfo('template_url'); ?>/img/700x400.png" alt="<?php echo get_the_title(); ?>" title="<?php echo get_the_title(); ?>" width="250" height="180" /> 
       </a> 
       <h3> 
       <a href="<?php the_permalink() ?>"> 
       <?php echo get_cat_name(71);?> 
       </a> 
       </h3> 
       <p><?php echo category_description(); ?></p> 
      </div> 

      <div class="col-md-4 portfolio-item"> 
       <a href="#project-link"> 
        <img src="<?php bloginfo('template_url'); ?>/img/700x400.png" alt="<?php echo get_the_title(); ?>" title="<?php echo get_the_title(); ?>" width="250" height="180" /> 
       </a> 
       <h3> 
       <a href="<?php the_permalink() ?>"> 
       <?php echo get_cat_name(72);?> 
       </a> 
       </h3> 
       <p><?php echo category_description(); ?></p> 
      </div> 



      </div> 

     <div class="row"> 

      <div class="col-md-4 portfolio-item"> 
       <a href="#project-link"> 
        <img src="<?php bloginfo('template_url'); ?>/img/700x400.png" alt="<?php echo get_the_title(); ?>" title="<?php echo get_the_title(); ?>" width="250" height="180" /> 
       </a> 
       <h3> 
       <a href="<?php the_permalink() ?>"> 
       <?php echo get_cat_name(69);?> 
       </a> 
       </h3> 
       <p><?php echo category_description(); ?></p> 
      </div> 

      <div class="col-md-4 portfolio-item"> 
       <a href="#project-link"> 
        <img src="<?php bloginfo('template_url'); ?>/img/700x400.png" alt="<?php echo get_the_title(); ?>" title="<?php echo get_the_title(); ?>" width="250" height="180" /> 
       </a> 
       <h3> 
       <a href="<?php the_permalink() ?>"> 
       <?php echo get_cat_name(74);?> 
       </a> 
       </h3> 
       <p><?php echo category_description(); ?></p> 
      </div> 
+ 
      </div> 

    </div> 

    </div> 
    </div> 

<?php get_footer(); ?> 

cevap

0

özel kategori sayfa için taksonomi-kategori-sülük-here.php adıyla Temanızın kök dizininde bir PHP dosyası oluşturmak zorunda. Senin için çalışacak.

taxonomy-category-slug-here.php 
İlgili konular