Created
October 16, 2017 20:50
-
-
Save carlosonweb/cd99acdfaf8e0d0f1df1f0193c2164a3 to your computer and use it in GitHub Desktop.
Sample Beaver Builder Theme Custom Archive Template
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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