Skip to content

Instantly share code, notes, and snippets.

@bhubbard
Last active September 6, 2017 17:55
Show Gist options
  • Save bhubbard/6001886 to your computer and use it in GitHub Desktop.
Save bhubbard/6001886 to your computer and use it in GitHub Desktop.
WordPress Template page for Areas of Expertise.
<?php
/*
Template Name: Areas of Expertise
*/
get_header(); ?>
<div id="primary" class="site-content">
<div id="content" role="main">
<?php while ( have_posts() ) : the_post(); ?>
<?php the_content(); ?>
<?php comments_template( '', true ); ?>
<?php endwhile; // end of the loop. ?>
<!-- Method 1: List by Child Pages -->
<div class="areas-of-expertise-list">
<?php wp_list_pages('title_li=&child_of='.$post->ID.'&sort_column=post_title'); ?>
</div>
<!-- Method 2: List by WordPress Menu -->
<div <class="areas-of-expertise-list">
<?php wp_nav_menu( array('menu' => 'areas-of-expertise' )); ?>
</div>
</div><!-- #content -->
</div><!-- #primary -->
<?php get_sidebar(); ?>
<?php get_footer(); ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment