Created
February 24, 2016 20:22
-
-
Save wpexplorer/a3f58b5f32026e7fb106 to your computer and use it in GitHub Desktop.
Total theme custom archive.php template file example
This file contains hidden or 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 | |
/* Example custom archive template file */ | |
// Get header | |
get_header(); ?> | |
<div id="content-wrap" class="container clr"> | |
<?php wpex_hook_primary_before(); ?> | |
<div id="primary" class="content-area clr"> | |
<?php wpex_hook_content_before(); ?> | |
<div id="content" class="site-content"> | |
<?php wpex_hook_content_top(); ?> | |
<?php | |
// Display posts if there are in fact posts to display | |
if ( have_posts() ) : | |
// Start post loop | |
while ( have_posts() ) : the_post(); ?> | |
<?php | |
/* THIS IS WHERE YOUR ENTRY CODE SHOULD GO */ ?> | |
<?php endwhile; ?> | |
<?php | |
// Add this for pagination | |
wpex_pagination(); ?> | |
<?php | |
// Show message because there aren't any posts (optional) | |
else : ?> | |
<article class="clr"><?php esc_html_e( 'No Posts found.', 'total' ); ?></article> | |
<?php endif; ?> | |
<?php wpex_hook_content_bottom(); ?> | |
</div><!-- #content --> | |
<?php wpex_hook_content_after(); ?> | |
</div><!-- #primary --> | |
<?php wpex_hook_primary_after(); ?> | |
</div><!-- .container --> | |
<?php get_footer(); ?> |
@joshcoast - that would be done via the wpex_post_layout_class filter.
Please post all support questions for this theme in the proper locations though - https://wpexplorer-themes.com/total/docs/how-to-request-support/ - if you need some help with a custom snippet for changing the layout on your custom template the developer can assist you there.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
How would one change the layout being used? For example, change it to a no-sidebar layout?