-
Notifications
You must be signed in to change notification settings - Fork 41
/
page-listcategories.php
executable file
·43 lines (31 loc) · 1.18 KB
/
page-listcategories.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<?php
/*
Template Name: List Child Categories
*/
?>
<?php get_header(); ?>
<div id="container">
<div id="content">
<?php if ( have_posts() ) the_post(); ?>
<?php do_action( 'sb_before_content' ); ?>
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<?php do_action( 'sb_page_title' ); ?>
<div class="entry-content">
<?php the_content(); ?>
<?php wp_link_pages( array( 'before' => '<div class="entry-pages cb">' . __( 'Pages:', 'startbox' ), 'after' => '</div>' ) ); ?>
<?php edit_post_link(__('Edit', 'startbox'),'<span class="edit-link">','</span>'); ?>
<ul id="category-list">
<?php
$categoryid = ( $_GET['cat'] ) ? $_GET['cat'] : get_post_meta($post->ID, 'categoryid', true);
$show_count = (get_post_meta($post->ID, 'show_count', true)) ? get_post_meta($post->ID, 'show_count', true) : 0;
wp_list_categories('child_of='.$categoryid.'&show_count='.$show_count.'&title_li=');
?>
</ul>
</div>
</div><!-- .post -->
<?php do_action( 'sb_after_content' ); ?>
<?php comments_template( '', true ); ?>
</div><!-- #content -->
</div><!-- #container -->
<?php get_sidebar(); ?>
<?php get_footer(); ?>