Skip to content

Instantly share code, notes, and snippets.

@Roy-Oto
Created May 13, 2021 02:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Roy-Oto/a003794e60e4630fff01b61ae477a157 to your computer and use it in GitHub Desktop.
Save Roy-Oto/a003794e60e4630fff01b61ae477a157 to your computer and use it in GitHub Desktop.
Before inserting the code into index.php
<?php get_header(); ?>
<?php if(is_front_page()) get_template_part('parts/home/featured-header'); ?>
[先程のコードをここに入力]
<div id="content">
<div id="inner-content" class="wrap cf">
<main id="main" class="m-all t-2of3 d-5of7 cf">
<?php
if(is_active_sidebar( 'home_top' )) dynamic_sidebar( 'home_top' );
if(get_option('activate_tab')) {
// タブありの記事一覧
get_template_part('parts/home/post-tab');
} else {
// タブなしの記事一覧
get_template_part('parts/post-grid');
}
if(is_active_sidebar( 'home_bottom' )) dynamic_sidebar( 'home_bottom' );
?>
</main>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment