Skip to content

Commit

Permalink
added several TOC templates
Browse files Browse the repository at this point in the history
  • Loading branch information
versluis committed Sep 30, 2018
1 parent 8dc301c commit f084cdd
Show file tree
Hide file tree
Showing 10 changed files with 629 additions and 11 deletions.
File renamed without changes.
18 changes: 7 additions & 11 deletions page-3d-articles.php → toc-blender.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* @subpackage Twenty_Thirteen
* @since Twenty Thirteen 1.0
Template Name: 3D Articles
Template Name: TOC - Blender Articles
*/

Expand Down Expand Up @@ -38,27 +38,23 @@

<?php
//
// show a list of 3D articles by tag
// show a list of articles by tag
// https://codex.wordpress.org/Class_Reference/WP_Query

// count all 3D articles
$query = new WP_Query( array( 'category_name' => '3D', 'nopaging' => true ) );
// grab all articles with tag
$query = new WP_Query( array( 'tag' => 'blender', 'nopaging' => true ) );
$results = $query->found_posts;
echo "<p>So far I've written $results 3D Articles for this site. Here's a list of each one, grouped together by software:</p>";
echo "<p>So far I've written <strong>$results articles</strong> about DAZ Studio for this site.<br>Here's a list of each and every one of them:</p>";

// list all DAZ Studio Articles
echo "<h3>DAZ Studio</h3>";
$query = new WP_Query( array( 'tag' => '3D', 'nopaging' => true ) );
$results = $query->found_posts;
// list all articles
if ($query->have_posts() ) {
echo "";
while ($query->have_posts() ) {
$query->the_post();
echo '<li><a href="' . get_permalink() . '">' . get_the_title() . '</a></li>';
}
echo "";
}
// end of screencasts
} // end of category articles list



Expand Down
78 changes: 78 additions & 0 deletions toc-carrara.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
<?php
/**
* The template for displaying all pages
*
* This is the template that displays all pages by default.
* Please note that this is the WordPress construct of pages and that other
* 'pages' on your WordPress site will use a different template.
*
* @package WordPress
* @subpackage Twenty_Thirteen
* @since Twenty Thirteen 1.0
Template Name: TOC - Hexagon Articles
*/

get_header(); ?>

<div id="primary" class="content-area">
<div id="content" class="site-content" role="main">

<?php /* The loop */ ?>
<?php while ( have_posts() ) : the_post(); ?>

<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<header class="entry-header">
<?php if ( has_post_thumbnail() && ! post_password_required() ) : ?>
<div class="entry-thumbnail">
<?php the_post_thumbnail(); ?>
</div>
<?php endif; ?>

<h1 class="entry-title"><?php the_title(); ?></h1>
</header><!-- .entry-header -->

<div class="entry-content">
<?php // the_content(); ?>

<?php
//
// show a list of articles by tag
// https://codex.wordpress.org/Class_Reference/WP_Query

// grab all articles with tag
$query = new WP_Query( array( 'tag' => 'hexagon', 'nopaging' => true ) );
$results = $query->found_posts;
echo "<p>So far I've written <strong>$results articles</strong> about Carrara for this site.<br>Here's a list of each and every one of them:</p>";

// list all articles
if ($query->have_posts() ) {
echo "";
while ($query->have_posts() ) {
$query->the_post();
echo '<li><a href="' . get_permalink() . '">' . get_the_title() . '</a></li>';
}
echo "";
} // end of category articles list



?>

<?php wp_link_pages( array( 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentythirteen' ) . '</span>', 'after' => '</div>', 'link_before' => '<span>', 'link_after' => '</span>' ) ); ?>
</div><!-- .entry-content -->

<footer class="entry-meta">
<?php edit_post_link( __( 'Edit', 'twentythirteen' ), '<span class="edit-link">', '</span>' ); ?>
</footer><!-- .entry-meta -->
</article><!-- #post -->

<?php // comments_template(); ?>
<?php endwhile; ?>

</div><!-- #content -->
</div><!-- #primary -->

<?php get_sidebar(); ?>
<?php get_footer(); ?>
76 changes: 76 additions & 0 deletions toc-daz-studio.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
<?php
/**
* The template for displaying all pages
*
* This is the template that displays all pages by default.
* Please note that this is the WordPress construct of pages and that other
* 'pages' on your WordPress site will use a different template.
*
* @package WordPress
* @subpackage Twenty_Thirteen
* @since Twenty Thirteen 1.0
Template Name: TOC - DAZ Studio Articles
*/

get_header(); ?>

<div id="primary" class="content-area">
<div id="content" class="site-content" role="main">

<?php /* The loop */ ?>
<?php while ( have_posts() ) : the_post(); ?>

<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<header class="entry-header">
<?php if ( has_post_thumbnail() && ! post_password_required() ) : ?>
<div class="entry-thumbnail">
<?php the_post_thumbnail(); ?>
</div>
<?php endif; ?>

<h1 class="entry-title"><?php the_title(); ?></h1>
</header><!-- .entry-header -->

<div class="entry-content">
<?php // the_content(); ?>

<?php

// grab all articles with tag
// https://codex.wordpress.org/Class_Reference/WP_Query
$query = new WP_Query( array( 'tag' => 'daz-studio', 'nopaging' => true ) );
$results = $query->found_posts;
echo "<p>So far I've written <strong>$results articles</strong> about DAZ Studio for this site.<br>Here's a list of each and every one of them:</p>";

// list those articles
if ($query->have_posts() ) {
echo "";
while ($query->have_posts() ) {
$query->the_post();
echo '<li><a href="' . get_permalink() . '">' . get_the_title() . '</a></li>';
}
echo "";
} // end of category articles list



?>

<?php wp_link_pages( array( 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentythirteen' ) . '</span>', 'after' => '</div>', 'link_before' => '<span>', 'link_after' => '</span>' ) ); ?>
</div><!-- .entry-content -->

<footer class="entry-meta">
<?php edit_post_link( __( 'Edit', 'twentythirteen' ), '<span class="edit-link">', '</span>' ); ?>
</footer><!-- .entry-meta -->
</article><!-- #post -->

<?php // comments_template(); ?>
<?php endwhile; ?>

</div><!-- #content -->
</div><!-- #primary -->

<?php get_sidebar(); ?>
<?php get_footer(); ?>
78 changes: 78 additions & 0 deletions toc-hexagon.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
<?php
/**
* The template for displaying all pages
*
* This is the template that displays all pages by default.
* Please note that this is the WordPress construct of pages and that other
* 'pages' on your WordPress site will use a different template.
*
* @package WordPress
* @subpackage Twenty_Thirteen
* @since Twenty Thirteen 1.0
Template Name: TOC - Blender Articles
*/

get_header(); ?>

<div id="primary" class="content-area">
<div id="content" class="site-content" role="main">

<?php /* The loop */ ?>
<?php while ( have_posts() ) : the_post(); ?>

<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<header class="entry-header">
<?php if ( has_post_thumbnail() && ! post_password_required() ) : ?>
<div class="entry-thumbnail">
<?php the_post_thumbnail(); ?>
</div>
<?php endif; ?>

<h1 class="entry-title"><?php the_title(); ?></h1>
</header><!-- .entry-header -->

<div class="entry-content">
<?php // the_content(); ?>

<?php
//
// show a list of articles by tag
// https://codex.wordpress.org/Class_Reference/WP_Query

// grab all articles with tag
$query = new WP_Query( array( 'tag' => 'blender', 'nopaging' => true ) );
$results = $query->found_posts;
echo "<p>So far I've written <strong>$results articles</strong> about Hexagon for this site.<br>Here's a list of each and every one of them:</p>";

// list all articles
if ($query->have_posts() ) {
echo "";
while ($query->have_posts() ) {
$query->the_post();
echo '<li><a href="' . get_permalink() . '">' . get_the_title() . '</a></li>';
}
echo "";
} // end of category articles list



?>

<?php wp_link_pages( array( 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentythirteen' ) . '</span>', 'after' => '</div>', 'link_before' => '<span>', 'link_after' => '</span>' ) ); ?>
</div><!-- .entry-content -->

<footer class="entry-meta">
<?php edit_post_link( __( 'Edit', 'twentythirteen' ), '<span class="edit-link">', '</span>' ); ?>
</footer><!-- .entry-meta -->
</article><!-- #post -->

<?php // comments_template(); ?>
<?php endwhile; ?>

</div><!-- #content -->
</div><!-- #primary -->

<?php get_sidebar(); ?>
<?php get_footer(); ?>
78 changes: 78 additions & 0 deletions toc-md.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
<?php
/**
* The template for displaying all pages
*
* This is the template that displays all pages by default.
* Please note that this is the WordPress construct of pages and that other
* 'pages' on your WordPress site will use a different template.
*
* @package WordPress
* @subpackage Twenty_Thirteen
* @since Twenty Thirteen 1.0
Template Name: TOC - MD Articles
*/

get_header(); ?>

<div id="primary" class="content-area">
<div id="content" class="site-content" role="main">

<?php /* The loop */ ?>
<?php while ( have_posts() ) : the_post(); ?>

<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<header class="entry-header">
<?php if ( has_post_thumbnail() && ! post_password_required() ) : ?>
<div class="entry-thumbnail">
<?php the_post_thumbnail(); ?>
</div>
<?php endif; ?>

<h1 class="entry-title"><?php the_title(); ?></h1>
</header><!-- .entry-header -->

<div class="entry-content">
<?php // the_content(); ?>

<?php
//
// show a list of articles by tag
// https://codex.wordpress.org/Class_Reference/WP_Query

// grab all articles with tag
$query = new WP_Query( array( 'tag' => 'marvelous-designer', 'nopaging' => true ) );
$results = $query->found_posts;
echo "<p>So far I've written <strong>$results articles</strong> about Marvelous Designer for this site.<br>Here's a list of each and every one of them:</p>";

// list all articles
if ($query->have_posts() ) {
echo "";
while ($query->have_posts() ) {
$query->the_post();
echo '<li><a href="' . get_permalink() . '">' . get_the_title() . '</a></li>';
}
echo "";
} // end of category articles list



?>

<?php wp_link_pages( array( 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentythirteen' ) . '</span>', 'after' => '</div>', 'link_before' => '<span>', 'link_after' => '</span>' ) ); ?>
</div><!-- .entry-content -->

<footer class="entry-meta">
<?php edit_post_link( __( 'Edit', 'twentythirteen' ), '<span class="edit-link">', '</span>' ); ?>
</footer><!-- .entry-meta -->
</article><!-- #post -->

<?php // comments_template(); ?>
<?php endwhile; ?>

</div><!-- #content -->
</div><!-- #primary -->

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

0 comments on commit f084cdd

Please sign in to comment.