fubasami
フォーラムへの返信
-
フォーラム: 使い方全般
返信が含まれるトピック: アーカイブページが見つからないフォーラム: 使い方全般
返信が含まれるトピック: taxsonomy-A.php 内に タクソノミーBで区切った表示をさせたいお礼遅くなりました。
ありがとうございます。いろいろ工夫してみましたが、
本質を理解できていないので修正に至りませんでした。<h3><?php echo $_post; ?></h3>
が空っぽになるのが直せませんでした。ありがとうございました。
フォーラム: 使い方全般
返信が含まれるトピック: taxsonomy-A.php 内に タクソノミーBで区切った表示をさせたい以下の方法で一応、肉-10分、20分、30分 等表示できました。
ただ、40分が加わった時にまた修正が必要なので、
引き続きループ処理で表示するやり方を模索中です。<h3>10分</h3>
<?php while (have_posts()) : the_post(); ?>
<?php
$cat = get_the_category();
$catslug = $cat[0]->category_nicename;
?>
<?php if ( is_object_in_term($post->ID, ‘taxsonomy-B’,’termB-1′) ): ?>
<h4>“><?php the_title_attribute(); ?></h4>
<?php endif; ?>
<?php endwhile; ?><h3>20分</h3>
<?php while (have_posts()) : the_post(); ?>
<?php
$cat = get_the_category();
$catslug = $cat[0]->category_nicename;
?>
<?php if ( is_object_in_term($post->ID, ‘taxsonomy-B’,’termB-2′) ): ?>
<h4>“><?php the_title_attribute(); ?></h4>
<?php endif; ?>
<?php endwhile; ?><h3>30分</h3>
<?php while (have_posts()) : the_post(); ?>
<?php
$cat = get_the_category();
$catslug = $cat[0]->category_nicename;
?>
<?php if ( is_object_in_term($post->ID, ‘taxsonomy-B’,’termB-3′) ): ?>
<h4>“><?php the_title_attribute(); ?></h4>
<?php endif; ?>
<?php endwhile; ?>フォーラム: 使い方全般
返信が含まれるトピック: taxsonomy-A.php 内に タクソノミーBで区切った表示をさせたいフォーラム: 使い方全般
返信が含まれるトピック: 固定ページで親子関係を作った時にheader内の条件分岐で、子ページすべてに親と同じスタイルシートを追加したいありがとうございます!
やりたい事出来ました!!wordpressで「○○の子ページ」という指定の仕方は
用意されてないのですね。重ね重ね、ありがとうございました。
フォーラム: 使い方全般
返信が含まれるトピック: 固定ページで親子関係を作った時にheader内の条件分岐で、子ページすべてに親と同じスタイルシートを追加したいありがとうございます。
しかしながら、ダメでした。子ページをすべて拾ってきてしまうようで、
/about/の子にも
/contact/の子にも
全部 「//子ページ」 の内容が出ていました。if ( is_page(‘about’) && $post->post_parent ) {
ともしてみたのですが、今度はaboutの子ページにも「//子ページ」が出なくなってしまいました。ありがとうございました。
フォーラム: 使い方全般
返信が含まれるトピック: カスタム投稿タイプでユーザーごとの記事一覧のページを作りたいauthor情報が所得出来てないのね?
<?php
$author_id = $post->post_author; // 現在の投稿者ID を変数に代入
$query= ‘author=’ . $author_id. ‘&showposts=20&post_type=column’; // クエリを連結
query_posts($query); // クエリを実行
?>
↑を↓のように変更
<?php $author_id = $curauth->ID; ?><!–現在の投稿者ID を変数に代入–>
<?php query_posts(‘author=’.$author_id.’&showposts=20&post_type=column’);?>
<?php if ( have_posts() ): while ( have_posts() ): the_post(); ?>出来たみたいです。