Q&A
wordpressフォルダの外にカテゴリごとのフォルダを作り、そのフォルダ内のblog.phpに
以下のコードを使い、カテゴリ別のアーカイブを表示していましたが、
<?php wp_get_archives('type=monthly&cat=4&show_post_count=1'); ?>
リンク先が突然真っ白になってしまい、原因がわかりません。
wordpressは手探りの状態で、phpも初心者のため、
どなたかご教示お願いできないでしょうか?
プラグインは「Archives for a category」を使用しています。
テーマは前任者の自作になります。
wp-config.phpでのエラーは以下になります。
—
Warning: include(/syn/var/www/example/example113/doc/wpress/wp-content/themes/example/category-example-blog.php): failed to open stream: Permission denied in /syn/var/www/example/example113/doc/wpress/wp-includes/template-loader.php on line 74 Warning: include(): Failed opening '/syn/var/www/example/example113/doc/wpress/wp-content/themes/example/category-example-blog.php' for inclusion (include_path='.:/usr/share/pear:/usr/share/php') in /syn/var/www/example/example113/doc/wpress/wp-includes/template-loader.php on line 74
(exampleの部分はダミーで入れています。)
直前の操作としてはheader.phpに書かれているsyle.cssのリンク先を
<?php bloginfo('template_directory'); ?>/shared/css/syle.css">
から
<?php bloginfo ('stylesheet_url'); ?>
に変え、syle.cssをテーマフォルダ直下に移しました。(以前はsyle.cssがshared/cssフォルダの中にあってもテーマが使えたのですが、テーマが使えなくなり、どこかのネット記事を参考にテーマ直下に置くことで解決しました。)
function.phpは以下のようになっています。
<?php add_theme_support( 'automatic-feed-links' ); ?> <?php if ( function_exists('register_sidebar') ) register_sidebar(); ?> <?php function new_excerpt_mblength($length) { return 40; } add_filter('excerpt_mblength', 'new_excerpt_mblength'); ?> <?php function new_excerpt_more($more) { return '...'; } add_filter('excerpt_more', 'new_excerpt_more'); ?>
エラー文にある、(/syn/var/www/example/example113/doc/wpress/wp-content/themes/example/category-example-blog.php)には該当のファイルは存在しているんですが、表示されません。
他に情報が必要であればお教えいただければ提示いたします。
よろしくお願いいたします。
回答2件
下記のような回答は推奨されていません。
このような回答には修正を依頼しましょう。
2018/01/08 11:57
退会済みユーザー
2018/01/08 13:18
2018/01/10 20:56