-
Notifications
You must be signed in to change notification settings - Fork 130
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit e53fd6b
Showing
164 changed files
with
22,721 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,13 @@ | |||
<?php get_template_part( 'templates/page', 'header' ); ?> | |||
|
|||
<div class="alert alert-warning"> | |||
<?php _e( 'Sorry, but the page you were trying to view does not exist.', 'roots' ); ?> | |||
</div> | |||
|
|||
<p><?php _e( 'It looks like this was the result of either:', 'roots' ); ?></p> | |||
<ul> | |||
<li><?php _e( 'a mistyped address', 'roots' ); ?></li> | |||
<li><?php _e( 'an out-of-date link', 'roots' ); ?></li> | |||
</ul> | |||
|
|||
<?php get_search_form(); ?> |
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
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,49 @@ | |||
<?php | |||
$parent_cat = get_queried_object(); | |||
$categories = get_terms( 'category', array('hide_empty' => false, 'orderby' => 'term_id', 'parent' => $parent_cat->term_id) ); | |||
|
|||
if ( $categories ) { | |||
printf( '<h2 class="category-title">%s</h2>', $parent_cat->name ); | |||
|
|||
echo '<ul class="doc-category clearfix">'; | |||
foreach ( $categories as $category ) { | |||
include 'templates/loop-category.php'; | |||
} | |||
echo '</ul>'; | |||
} | |||
|
|||
// WP_Query arguments | |||
$args = array( | |||
'post_type' => 'post', | |||
'category__in' => array( $parent_cat->term_id ), | |||
'posts_per_page' => -1 | |||
); | |||
|
|||
// The Query | |||
$doc_query = new WP_Query( $args ); | |||
|
|||
// The Loop | |||
if ( $doc_query->have_posts() ) { | |||
|
|||
printf( '<h2 class="category-title">%s</h2>', __( 'Documents', 'wedevs-docs' ) ); | |||
|
|||
echo '<ul class="doc-category">'; | |||
while ($doc_query->have_posts()) { | |||
$doc_query->the_post(); | |||
|
|||
get_template_part( 'templates/loop-content' ); | |||
} | |||
echo '</ul>'; | |||
} else { | |||
// no posts found | |||
} | |||
|
|||
// Restore original Post Data | |||
wp_reset_postdata(); | |||
?> | |||
|
|||
<?php if ( !$categories && !$doc_query->have_posts() ) { ?> | |||
<div class="alert alert-warning"> | |||
<?php _e( 'Nothing found!', 'wedevs-docs' ); ?> | |||
</div> | |||
<?php } ?> |
Oops, something went wrong.