ページネーションのタグを非表示にしたい
-
こんにちは
スタイルシート(CSS)で、br タグを非表示(display: none)にするのはいかかでしょうか?
ご使用のテーマやページネーションを出力しているコード(プラグイン?)などを提示されるともう少し具体的な回答がつくかもしれません。
ご丁寧にありがとうございます。
テーマは、TCDのorionになります。
スタイルシートとphpの提示で大丈夫でしょうか?
初心者なものですみません。スタイルシート
/* 次の記事、前の記事 */ #previous_next_post { margin:0 0 50px 0; } #previous_next_post .prev_post, #previous_next_post .next_post { float:left; width:410px; } #previous_next_post .next_post { float:right; } #previous_next_post a { display:block; border:1px solid #ddd; padding:20px; line-height:130%; height:150px; color:#333; text-decoration:none; position:relative; -moz-box-sizing:border-box; -webkit-box-sizing:border-box; -o-box-sizing:border-box; -ms-box-sizing:border-box; box-sizing:border-box; -webkit-transition: all 0.35s ease-in-out; -moz-transition: all 0.35s ease-in-out; transition: all 0.35s ease-in-out; } #previous_next_post img { width:110px; height:110px; float:left; margin:0 20px 0 0; } #previous_next_post .title { display:block; font-size:14px; line-height:180%; max-height:100px; overflow:hidden; padding:5px 0 0 0; } #previous_next_post a:hover { background-color:#f5f6f6; border:1px solid #f5f6f6; } #previous_next_post .label { display:inline-block; background:#222; color:#fff; padding:10px 0; font-size:12px; position:relative; margin:0 0 0 20px; width:110px; text-align:center; } #previous_next_post .label:before { font-family:'design_plus'; color:#fff; font-size:12px; display:block; position:absolute; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } #previous_next_post .prev_post .label:before { content:'\e90f'; top:11px; left:10px; } #previous_next_post .next_post .label:before { content:'\e910'; top:11px; right:10px; }php
<?php $args = array ( 'prev_text' => 'NEXT>', 'next_text' => '<PREV', 'show_all' => true, ); ?> <div class="pagination"> <?php the_posts_pagination( $args ); ?> </div>こんな感じでしょうか。
カスタマイズの [追加 CSS] などに、
#previous_next_post .title br { display: none; }ありがとうございます!!
こちらで試してみます。あと、こちらに書いて申し訳ありませんが、
カスタム投稿の一覧ページの編集で、管理画面の固定ページからだと
タイトル下等にテキストブロック等を入れることができないのですが(phpだとできる)
こちらも何か方法はありますでしょうか?関係ない質問で申し訳ありません…。
お手数をお掛けします。
テストページですが、こちらのページの下の「前へ」は肩書きと名前の間にスペースを入れています。
「次へ」は<br>を入れているのですが、こちらの<br>を非表示にしたいです。<div class="pagination"> <?php the_posts_pagination( $args ); ?> </div>対象のページネーションを表示しているコードは、このコードではありません。
下記のようなコードで前・次ページのタイトルを表示していると思われます。esc_html( get_the_title( 前後のID ) )
この esc_html を strip_tags などに変更するとできると思います。
そうなのですね…。
初心者には難しいですね。archive-○○.phpやsingle-○○.phpには似たようなコードが見つからず…
また別のファイルにあるのでしょうか何度もすみません。
トピック「ページネーションのタグを非表示にしたい」には新たに返信することはできません。