###前提・実現したいこと
① 記事一覧ページでは、投稿内容の文章を省略(最後に...などがつく)
② 記事詳細ページでは、文章を省略せずすべて表示させたい
のですが、①に関しては「template-parts/content.php」を編集して実現できました。
しかし、記事詳細ページに飛んでも文章が省略されてしまっているので、
そこを全文章 表示にしたいです。
どこをどのように編集すれば実現できるでしょうか・・?
###現在の「template-parts/content.php」のコード
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> <header class="entry-header"> <?php if ( is_singular() ) : the_title( '<h1 class="entry-title">', '</h1>' ); else : the_title( '<h2 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h2>' ); endif; if ( 'post' === get_post_type() ) : ?> <div class="entry-meta"> <?php brillamico_posted_on(); ?> </div><!-- .entry-meta --> <?php endif; ?> </header><!-- .entry-header --> <div class="entry-content"> <a href="<?php the_permalink(); ?>"> <?php the_post_thumbnail('medium'); ?> </a> <a href="<?php the_permalink(); ?>"><?php the_excerpt(); ?></a> </div><!-- .entry-content --> <footer class="entry-footer"> <?php brillamico_entry_footer(); ?> </footer><!-- .entry-footer --> </article><!-- #post-<?php the_ID(); ?> -->
【補足】
※テーマは自作テーマで、「http://underscores.me/」のサイトから作ったものです。
※テンプレート内容については「https://www.hivelocity.co.jp/blog/30287/」の記事にて、ご確認頂けるようです。
私自身、HTMLとCSSしか学んでおらず、急ぎ対応でワードプレスを任されている状態なので、ご協力をお願いできればと思います。
回答1件
あなたの回答
tips
プレビュー