• 解決済 starmt

    (@starmt)


    以前、VK Link Target ControllerとDisplay Postsを使用して、新着記事一覧から新しいウィンドで開くための方法を見つけ、設定しました。
    https://ja.wordpress.org/support/topic/vk-link-target-controller%E3%81%A8display-posts%E3%81%AE%E4%BB%B6%E3%81%A7/

    テーマの functions.php に、

    function my_display_posts_shortcode_output( $output, $original_atts, $image, $title, $date, $excerpt, $inner_wrapper, $content, $class, $author, $category_display_text ) {
    	if ( $post_id = get_the_ID() ) {
    		$class = array_map( 'sanitize_html_class', $class );
    		$output = '<' . $inner_wrapper . ' id="post-' . $post_id . '" class="' . implode( ' ', $class ) . '">' . $image . $title . $date . $author . $category_display_text . $excerpt . $content . '</' . $inner_wrapper . '>';
    	}
    	return $output;
    }
    add_filter( 'display_posts_shortcode_output', 'my_display_posts_shortcode_output', 10, 11 );

    を入れ、PHPバージョン7.4.33ではプラグインの連携はできていました。

    先日、バージョン8.2(モジュール版/ロリポップ)に変更したら、新しいウィンドウで開けず、またURLを入れても、入力されたURLのページを表示できません。(クリックするとトップページを表示します)

    どのようにすれば、プラグインの連携ができるか、ご教示いただければ、幸いです。

    WordPress 6.3
    Display Posts 3.0.2
    VK Link Target Controller 1.7.2

    よろしくお願いいたします。

4件の返信を表示中 - 1 - 4件目 (全4件中)
  • こんにちは

    VK Link Target Controller 1.7.2 と PHP 8 以上の組み合わせで起きる現象のようです。パッチが提案されているので試されてみてはいかがでしょうか。

    https://github.com/vektor-inc/vk-link-target-controller/issues/62

    トピック投稿者 starmt

    (@starmt)

    ishitaka 様

    ご案内ありがとうございます。
    すみません。パッチについては不勉強なもので、お教えいただいてもよろしいですか。
    こちらのパッチをどのように使用すればよろしいでしょうか?

    お手数をおかけして申し訳ございませんが、ご教示いただけますと幸いです。

    パッチの当て方は、ここではご説明しきれそうになく、また WordPress とは直接関係がない内容になってしまうので、ググってみてください。

    トピック投稿者 starmt

    (@starmt)

    ありがとうございます。
    調べてみます!

4件の返信を表示中 - 1 - 4件目 (全4件中)
  • トピック「VK Link Target ControllerとDisplay Postsの件で」には新たに返信することはできません。