Skip to content

Instantly share code, notes, and snippets.

@rolandinsh
Last active December 10, 2015 19:48
Show Gist options
  • Save rolandinsh/4483857 to your computer and use it in GitHub Desktop.
Save rolandinsh/4483857 to your computer and use it in GitHub Desktop.
WordPress index.php file Variant A
<?php
get_header();
do_action('smc_before_main_content');
if(have_posts()):
do_action('some_other_action_before');
while ( have_posts() ) : the_post();
get_template_part( 'content', get_post_type() );
endwhile;
do_action('some_other_action_after');
else:
get_template_part( 'content-error404', get_post_type() );
endif;
get_sidebar();
do_action('smc_after_main_content');
get_footer();
/*
Copyright 2013 Rolands Umbrovskis ( http://umbrovskis.com/ )
Released under the http://simplemediacode.com/license/
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment