静的ページの新着情報の部分のみワードプレスの投稿機能を埋め込んでいるのですが、
VK Link Target Controllerというプラグインをインストールし、
入力したURLへ飛ぶようにしています。
その際、「別ウインドウで開く」にチェックを入れても同じウインドウで開いてしまいます・・・
phpは↓の様に書いているのですが、どのようにしたら別ウインドウで開くようになりますか?
また、id="post-<?php the_ID(); ?>"を入れないと機能しないという記事を見たので入れたのですが開きませんでした。
<?php $args = array( 'posts_per_page' => 3, 'paged' => $paged, 'post_type' => array( 'post', ), ); $the_query = new WP_Query( $args ); ?><?php wp_reset_postdata(); ?><ul> <?php if($the_query->have_posts()): ?> <?php while($the_query->have_posts()) : $the_query->the_post(); ?> <?php $category = get_the_category(); $cat_name = $category[ 0 ]->cat_name; $cat_slug = $category[ 0 ]->category_nicename; ?> <li> <p class="titleWrap"> <span class="date"><?php the_time( get_option( 'date_format' ) ); ?></span> <span class="title"><a href="<?php the_permalink(); ?>"><?php echo get_the_title(); ?></a></span> </p> <!-- .titleWrap --> </li> <?php endwhile; ?> <?php else : ?> <p>表示する記事はありませんでした。</p> <?php endif; ?> </ul>
ご回答お待ちしております。

回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。