Skip to content

Instantly share code, notes, and snippets.

@norilog4
Created November 2, 2019 23:09
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 norilog4/0c1112d2da57d1a825ff75ac92050e12 to your computer and use it in GitHub Desktop.
Save norilog4/0c1112d2da57d1a825ff75ac92050e12 to your computer and use it in GitHub Desktop.
固定ページのコメント部分コードを削除した後
<?php get_header(); ?>
<div id="content"<?php column_class();?>>
<div id="inner-content" class="wrap cf">
<main id="main" class="m-all t-2of3 d-5of7 cf">
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<article id="entry" <?php post_class('cf'); ?>>
<header class="article-header entry-header page-header">
<?php if(is_front_page()) : // ホーム固定の場合 ?>
<h2 class="page-title"><?php the_title(); // タイトル ?></h2>
<?php else : // 通常の場合 ?>
<?php breadcrumb(); ?>
<h1 class="page-title"><?php the_title(); // タイトル ?></h1>
<?php endif; ?>
<?php if (has_post_thumbnail() && !get_option('no_eyecatch_on_page')) : // アイキャッチ ?>
<p class="post-thumbnail"><?php the_post_thumbnail('thumb-940');?></p>
<?php endif; ?>
</header>
<section class="entry-content page-content cf">
<?php
the_content();
wp_link_pages( array(
'before' => '<div class="page-links dfont">',
'after' => '</div>',
'link_before' => '<span>',
'link_after' => '</span>',
) );
?>
</section>
<footer class="article-footer">
<aside>
<div class="footer-contents">
<?php insert_social_buttons();?>
</div>
</aside>
</footer>
<?php insert_json_ld(); // 構造化データ ?>
</article>
<?php endwhile; ?>
<?php else : ?>
<?php get_template_part('content', 'not-found'); ?>
<?php endif; ?>
</main>
<?php get_sidebar(); ?>
</div>
</div>
<?php get_footer(); ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment