フォーラムへの返信

9件の返信を表示中 - 1 - 9件目 (全9件中)
  • フォーラム: プラグイン
    返信が含まれるトピック: Advanced Custom Fields Repeater Field が保存できない
    トピック投稿者 toebisutanaka

    (@toebisutanaka)

    自己解決しました。

    No.9のすべてのRepeater Fieldsを複製したところ、複製されたカスタムフィールドでは保存することができました。
    その後、複製したものを複製元と同じフィールド名に変更するとまた保存できなくなったため、そのフィールド名でなにかゴミデータが残っていて保存に影響していたのかもしれません。

    • この返信は6年、 6ヶ月前にtoebisutanakaが編集しました。
    フォーラム: プラグイン
    返信が含まれるトピック: Advanced Custom Fields Repeater Field が保存できない
    トピック投稿者 toebisutanaka

    (@toebisutanaka)

    munyaguさん、
    ありがとうございます。

    私もキャッシュを疑ってブラウザ変えて試してみましたが、状況変わりませんでした。

    フォーラム: プラグイン
    返信が含まれるトピック: Advanced Custom Fields Repeater Field が保存できない
    トピック投稿者 toebisutanaka

    (@toebisutanaka)

    ishitakaさん、
    ありがとうございます。

    カスタムフィールドは9個設定しています。
    フィールドタイプは次のとおりです。
    1.テキスト
    2.テキスト
    3.画像
    4.Wysiwyg エディタ
    5.テキスト
    6.Repeater
     text
     text
    7.Repeater
     wysiwyg
    8.Wysiwyg エディタ
    9.Repeater
     text
     image
     wysiwyg
     text
     repeater
     repeater
     wysiwyg

    このうち、保存されないのはNo.9のすべてのRepeater Fieldsです。

    フォーラム: プラグイン
    返信が含まれるトピック: Advanced Custom Fields Repeater Field が保存できない
    トピック投稿者 toebisutanaka

    (@toebisutanaka)

    ishitakaさん、
    ありがとうございます。

    次のように変更してphpinfoで確認しましたが、状況変わりませんでした。
    post_max_size 128M
    memory_limit 1024M

    フォーラム: 使い方全般
    返信が含まれるトピック: get_posts で同じ記事が重複して取得されてしまう
    トピック投稿者 toebisutanaka

    (@toebisutanaka)

    mimosafaさん、ありがとうございます!!
    ご指摘どおり修正しましたら無事解決いたしました!

    フォーラム: 使い方全般
    返信が含まれるトピック: previous_post_link、next_post_linkのリンク先がおかしい
    トピック投稿者 toebisutanaka

    (@toebisutanaka)

    業者に委託して解決しました。
    解決後のソースを確認しましたが、よくわかりませんでした・・・。

    ソースをざっくり抜粋すると次のとおりです。

    【改修前】

    <?php the_title(); ?>
    <?php the_post(); ?>
    <?php the_content(); ?>
    <?php previous_post_link('%link','&laquo;&nbsp;前の記事へ',TRUE); ?>
    <?php next_post_link('%link','次の記事へ&nbsp;&raquo;',TRUE); ?>

    【改修後】

    <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
    <?php the_title(); ?>
    <?php the_content(); ?>
    <?php previous_post_link('%link','&laquo;&nbsp;前の記事へ',TRUE); ?>
    <?php next_post_link('%link','次の記事へ&nbsp;&raquo;',TRUE); ?>
    <?php endwhile;endif; ?>
    フォーラム: 使い方全般
    返信が含まれるトピック: previous_post_link、next_post_linkのリンク先がおかしい
    トピック投稿者 toebisutanaka

    (@toebisutanaka)

    gblsmさん、ご返信ありがとうございます。
    テーマは独自のテーマを使っており、その中で上記のコーディングを行っています。

    next_post_linkでgrep検索したところ、2ソースがヒットしました。
    ヒットしたソースを載せます。
    なにかわかりますでしょうか?

    wp-includes/deprecated.php
    ————————————
    /**
    * Prints link to the next post.
    *
    * @since 0.71
    * @deprecated 2.0.0 Use next_post_link()
    * @see next_post_link()
    *
    * @param string $format
    * @param string $next
    * @param string $title
    * @param string $in_same_cat
    * @param int $limitnext
    * @param string $excluded_categories
    */
    function next_post($format=’%’, $next=’next post: ‘, $title=’yes’, $in_same_cat=’no’, $limitnext=1, $excluded_categories=”) {
    _deprecated_function( __FUNCTION__, ‘2.0.0’, ‘next_post_link()’ );
    if ( empty($in_same_cat) || ‘no’ == $in_same_cat )
    $in_same_cat = false;
    else
    $in_same_cat = true;
    $post = get_next_post($in_same_cat, $excluded_categories);
    if ( !$post )
    return;
    $string = ‘ID).'”>’.$next;
    if ( ‘yes’ == $title )
    $string .= apply_filters(‘the_title’, $post->post_title, $post->ID);
    $string .= ‘
    ‘;
    $format = str_replace(‘%’, $string, $format);
    echo $format;
    }
    ————————————

    wp-includes/link-template.php
    ————————————
    /**
    * Retrieves the next post link that is adjacent to the current post.
    *
    * @since 3.7.0
    *
    * @param string $format Optional. Link anchor format. Default ‘« %link’.
    * @param string $link Optional. Link permalink format. Default ‘%title’.
    * @param bool $in_same_term Optional. Whether link should be in a same taxonomy term. Default false.
    * @param array|string $excluded_terms Optional. Array or comma-separated list of excluded term IDs. Default empty.
    * @param string $taxonomy Optional. Taxonomy, if $in_same_term is true. Default ‘category’.
    * @return string The link URL of the next post in relation to the current post.
    */
    function get_next_post_link( $format = ‘%link »’, $link = ‘%title’, $in_same_term = false, $excluded_terms = ”, $taxonomy = ‘category’ ) {
    return get_adjacent_post_link( $format, $link, $in_same_term, $excluded_terms, false, $taxonomy );
    }

    /**
    * Displays the next post link that is adjacent to the current post.
    *
    * @since 1.5.0
    * @see get_next_post_link()
    *
    * @param string $format Optional. Link anchor format. Default ‘« %link’.
    * @param string $link Optional. Link permalink format. Default ‘%title’
    * @param bool $in_same_term Optional. Whether link should be in a same taxonomy term. Default false.
    * @param array|string $excluded_terms Optional. Array or comma-separated list of excluded term IDs. Default empty.
    * @param string $taxonomy Optional. Taxonomy, if $in_same_term is true. Default ‘category’.
    */
    function next_post_link( $format = ‘%link »’, $link = ‘%title’, $in_same_term = false, $excluded_terms = ”, $taxonomy = ‘category’ ) {
    echo get_next_post_link( $format, $link, $in_same_term, $excluded_terms, $taxonomy );
    }

    /**
    * Retrieves the adjacent post link.
    *
    * Can be either next post link or previous.
    *
    * @since 3.7.0
    *
    * @param string $format Link anchor format.
    * @param string $link Link permalink format.
    * @param bool $in_same_term Optional. Whether link should be in a same taxonomy term. Default false.
    * @param array|string $excluded_terms Optional. Array or comma-separated list of excluded terms IDs. Default empty.
    * @param bool $previous Optional. Whether to display link to previous or next post. Default true.
    * @param string $taxonomy Optional. Taxonomy, if $in_same_term is true. Default ‘category’.
    * @return string The link URL of the previous or next post in relation to the current post.
    */
    function get_adjacent_post_link( $format, $link, $in_same_term = false, $excluded_terms = ”, $previous = true, $taxonomy = ‘category’ ) {
    if ( $previous && is_attachment() )
    $post = get_post( get_post()->post_parent );
    else
    $post = get_adjacent_post( $in_same_term, $excluded_terms, $previous, $taxonomy );
    if ( ! $post ) {
    $output = ”;
    } else {
    $title = $post->post_title;
    if ( empty( $post->post_title ) )
    $title = $previous ? __( ‘Previous Post’ ) : __( ‘Next Post’ );
    /** This filter is documented in wp-includes/post-template.php */
    $title = apply_filters( ‘the_title’, $title, $post->ID );
    $date = mysql2date( get_option( ‘date_format’ ), $post->post_date );
    $rel = $previous ? ‘prev’ : ‘next’;
    $string = ‘‘;
    $inlink = str_replace( ‘%title’, $title, $link );
    $inlink = str_replace( ‘%date’, $date, $inlink );
    $inlink = $string . $inlink . ‘
    ‘;
    $output = str_replace( ‘%link’, $inlink, $format );
    }
    $adjacent = $previous ? ‘previous’ : ‘next’;

    /**
    * Filters the adjacent post link.
    *
    * The dynamic portion of the hook name, $adjacent, refers to the type
    * of adjacency, ‘next’ or ‘previous’.
    *
    * @since 2.6.0
    * @since 4.2.0 Added the $adjacent parameter.
    *
    * @param string $output The adjacent post link.
    * @param string $format Link anchor format.
    * @param string $link Link permalink format.
    * @param WP_Post $post The adjacent post.
    * @param string $adjacent Whether the post is previous or next.
    */
    return apply_filters( “{$adjacent}_post_link”, $output, $format, $link, $post, $adjacent );
    }
    ————————————

    • この返信は7年、 6ヶ月前にtoebisutanakaが編集しました。
    フォーラム: 使い方全般
    返信が含まれるトピック: previous_post_link、next_post_linkのリンク先がおかしい
    トピック投稿者 toebisutanaka

    (@toebisutanaka)

    2つのカテゴリーがあり、上記1,2,3はすべて同じカテゴリーに所属しています。

    フォーラム: 使い方全般
    返信が含まれるトピック: previous_post_link、next_post_linkのリンク先がおかしい
    トピック投稿者 toebisutanaka

    (@toebisutanaka)

    ご回答ありがとうございます。
    そうですね、日付順のようです。
    ただ、投稿日は1→2→3の順なので、やはりリンク先が自分なのはおかしいです・・・。

9件の返信を表示中 - 1 - 9件目 (全9件中)