[過去ログ]
【PHP】下らねぇ質問はここに書き込みやがれ 12 (1002レス)
上
下
前
次
1-
新
このスレッドは過去ログ倉庫に格納されています。
次スレ検索
歴削→次スレ
栞削→次スレ
過去ログメニュー
416
:
(オッペケ Sra1-AlcT)
2021/07/09(金)18:15
ID:KkNlGqxZr(1/4)
AA×
[240|
320
|
480
|
600
|
100%
|
JPG
|
べ
|
レス栞
|
レス消
]
416: (オッペケ Sra1-AlcT) [] 2021/07/09(金) 18:15:18 ID:KkNlGqxZr <php $args = array('posts_per_page' => 2, 'orderby' => 'date',);$posts_array = get_posts( $args );if (!empty($posts)):> <php foreach($posts_array as $post):setup_postdata($posts_array);> <a href="<php echo get_permalink();>"><div class="img-wrap"> 画像 <php if ( has_post_thumbnail()){ //存在 the_post_thumbnail();} else { //存在しない echo '<img src="noimage.jpg">';}></div> タイトル <h2><php the_title(); ></h2> 日付け <php the_time('Y/m/d');> カテゴリー <php $categories = get_the_category();if ( $categories ) {echo '<ul>'; foreach ( $categories as $category ) {echo '<li class="cat1"'.$category->slug.'"><a href="'.esc_url(get_category_link($category->term_id)).'">'.$category->name.'</a></li>';} echo '</ul>';}> コメント数 <php $num_comments = get_comments_number();if ( $num_comments == 0 ) {$comments = __('No Comments'); } elseif ( $num_comments > 1 ) {$comments = $num_comments . __(' Comments'); } else {$comments = __('1 Comment'); $write_comments = '<span class="singlecomments"><a href="' . get_comments_link() .'">'. $comments.'</a></span>';echo $write_comments;> コメントの抜粋 <php the_excerpt();> 記事を読む <a href="<php the_permalink();>">記事を読む</a> <php endforeach;> <php else:> <div class="newarrival_nodata"><p>記事</p></div> <php endif;wp_reset_postdata();> ページナビを実装したいんですが、$nextpostと$prevpostを使って2ページ目を表示させる場合どういうコードを書けばよいのでしょうか? http://mevius.5ch.net/test/read.cgi/tech/1619667579/416
画像 存在 存在しない タイトル 日付け カテゴリー コメント数 コメントの抜粋 記事を読む 記事を読む 記事 ページナビを実装したいんですがとを使ってページ目を表示させる場合どういうコードを書けばよいのでしょうか?
上
下
前
次
1-
新
書
関
写
板
覧
索
設
栞
歴
あと 586 レスあります
スレ情報
赤レス抽出
画像レス抽出
歴の未読スレ
AAサムネイル
ぬこの手
ぬこTOP
0.049s