Skip to content

Instantly share code, notes, and snippets.

@tamarazuk
Last active December 25, 2015 21:59
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tamarazuk/a060d4fab09adba0105c to your computer and use it in GitHub Desktop.
Save tamarazuk/a060d4fab09adba0105c to your computer and use it in GitHub Desktop.
<img class="img-responsive align-center featured" src="<?php echo get_theme_root_uri(); ?>/proman/assets/img/code011.jpg" alt="Folio Feature Image">
<div class="container">
<?php if (!have_posts()) : ?>
<div class="alert">
<?php _e('Sorry, no results were found.', 'roots'); ?>
</div>
<?php get_search_form(); ?>
<?php endif; ?>
<div class="recent-posts row">
<?php while (have_posts()) : the_post(); ?>
<div class="col-sm-4">
<?php get_template_part('templates/folio', get_post_format()); ?>
</div>
<?php endwhile; ?>
</div>
<?php if ($wp_query->max_num_pages > 1) : ?>
<nav class="post-nav">
<ul class="pager">
<li class="previous"><?php next_posts_link(__('&larr; Older posts', 'roots')); ?></li>
<li class="next"><?php previous_posts_link(__('Newer posts &rarr;', 'roots')); ?></li>
</ul>
</nav>
<?php endif; ?>
</div>
<?php
/**
* Define which pages shouldn't have the sidebar
*
* See lib/sidebar.php for more details
*/
function roots_display_sidebar() {
$sidebar_config = new Roots_Sidebar(
/**
* Conditional tag checks (http://codex.wordpress.org/Conditional_Tags)
* Any of these conditional tags that return true won't show the sidebar
*
* To use a function that accepts arguments, use the following format:
*
* array('function_name', array('arg1', 'arg2'))
*
* The second element must be an array even if there's only 1 argument.
*/
array(
'is_404',
'is_front_page',
array( 'is_post_type_archive', array('portfolio') )
),
/**
* Page template checks (via is_page_template())
* Any of these page templates that return true won't show the sidebar
*/
array(
'template-custom.php',
'template-about.php'
)
);
return apply_filters('roots_display_sidebar', $sidebar_config->display);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment