Skip to content

Instantly share code, notes, and snippets.

@carlosonweb
Created October 16, 2017 20:50
Show Gist options
  • Save carlosonweb/cd99acdfaf8e0d0f1df1f0193c2164a3 to your computer and use it in GitHub Desktop.
Save carlosonweb/cd99acdfaf8e0d0f1df1f0193c2164a3 to your computer and use it in GitHub Desktop.
Sample Beaver Builder Theme Custom Archive Template
<?php
/*
Template Name: BB Sample Archives
*/
?>
<?php get_header(); ?>
<div class="fl-archive container">
<div class="row">
<?php FLTheme::sidebar('left'); ?>
<div class="fl-content <?php FLTheme::content_class(); ?>" itemscope="itemscope" itemtype="http://schema.org/Blog">
<h2>Archives by Category</h2>
<ul>
<?php
// You have to modify this part:
$categories = get_categories( );
foreach( $categories as $category ) {
$output_categories[$category->cat_ID] = $category->name;
echo '<li>' . $category->cat_ID . ' :: ' . $category->name . '</li>';
// Run query_posts() here
}
?>
</ul>
</div>
<?php FLTheme::sidebar('right'); ?>
</div>
</div>
<?php get_footer(); ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment