質問編集履歴
3
問題がある可能性のコードを追記しました。
test
CHANGED
File without changes
|
test
CHANGED
@@ -9,12 +9,6 @@
|
|
9
9
|
カスタムフィールドにて、投稿日とは別の日付を設定しています。
|
10
10
|
|
11
11
|
このカスタムフィールドで管理している日付をもとに、<?php get_calendar; ?>でイベントカレンダーを出力したいのですが、現状、カレンダーが投稿日にリンクされてしまっている状態です。
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
general-template.phpを編集する方法で構いませんので、何か良いお知恵はないでしょうか?
|
16
|
-
|
17
|
-
宜しくお願い致します。
|
18
12
|
|
19
13
|
|
20
14
|
|
@@ -38,12 +32,46 @@
|
|
38
32
|
|
39
33
|
|
40
34
|
|
41
|
-
###試したこと
|
35
|
+
###試したこと1
|
42
36
|
|
43
|
-
|
37
|
+
1.[カスタム投稿タイプのカレンダーを表示する](http://kotori-blog.com/wordpress/cpt_calendar/)
|
44
38
|
|
45
39
|
→無事、"event"のカレンダーが表示されましたがリンクが投稿日になってしまいます。
|
46
40
|
|
47
|
-
|
41
|
+
2.[カスタム3兄弟で作る独自イベントカレンダー](http://www.slideshare.net/yuusukeyoshida7583/event-calendar-40951772)
|
48
42
|
|
49
43
|
→general-template.php の該当部分をこのページのように差し替えましたが何も変化がありません。
|
44
|
+
|
45
|
+
|
46
|
+
|
47
|
+
|
48
|
+
|
49
|
+
###追記1(試したこと2)
|
50
|
+
|
51
|
+
「試したこと1」の、1.[カスタム投稿タイプのカレンダーを表示する](http://kotori-blog.com/wordpress/cpt_calendar/)内で、
|
52
|
+
|
53
|
+
wp-includes/general-template.php の記述を編集していることがわかりました。
|
54
|
+
|
55
|
+
wp-includes/general-template.php 2000行目辺りの以下の部分を編集すればなんとかなりそうな気がするのですが、どうすれば良いか検討がつきません。
|
56
|
+
|
57
|
+
|
58
|
+
|
59
|
+
お知恵をお貸し下さい。
|
60
|
+
|
61
|
+
宜しくお願いいたします。
|
62
|
+
|
63
|
+
|
64
|
+
|
65
|
+
```
|
66
|
+
|
67
|
+
// Get days with posts
|
68
|
+
|
69
|
+
$dayswithposts = $wpdb->get_results("SELECT DISTINCT DAYOFMONTH(post_date)
|
70
|
+
|
71
|
+
FROM $wpdb->posts WHERE post_date >= '{$thisyear}-{$thismonth}-01 00:00:00'
|
72
|
+
|
73
|
+
AND post_type = '$cpt' AND post_status = 'publish'
|
74
|
+
|
75
|
+
AND post_date <= '{$thisyear}-{$thismonth}-{$last_day} 23:59:59'", ARRAY_N);
|
76
|
+
|
77
|
+
```
|
2
余計な装飾の削除
test
CHANGED
File without changes
|
test
CHANGED
@@ -24,10 +24,6 @@
|
|
24
24
|
|
25
25
|
|
26
26
|
|
27
|
-
----------------------
|
28
|
-
|
29
|
-
|
30
|
-
|
31
27
|
なお、カスタム投稿タイプの作成は「Custom Post Type UI」
|
32
28
|
|
33
29
|
カスタムフィールドの作成は「Advanced Custom Fields」を使用しています。
|
1
誤字の修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -42,16 +42,6 @@
|
|
42
42
|
|
43
43
|
|
44
44
|
|
45
|
-
###該当のソースコード
|
46
|
-
|
47
|
-
```ここに言語を入力
|
48
|
-
|
49
|
-
ここにご自身が実行したソースコードを書いてください
|
50
|
-
|
51
|
-
```
|
52
|
-
|
53
|
-
|
54
|
-
|
55
45
|
###試したこと
|
56
46
|
|
57
47
|
・[カスタム投稿タイプのカレンダーを表示する](http://kotori-blog.com/wordpress/cpt_calendar/)
|
@@ -61,9 +51,3 @@
|
|
61
51
|
・[カスタム3兄弟で作る独自イベントカレンダー](http://www.slideshare.net/yuusukeyoshida7583/event-calendar-40951772)
|
62
52
|
|
63
53
|
→general-template.php の該当部分をこのページのように差し替えましたが何も変化がありません。
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
###補足情報(言語/FW/ツール等のバージョンなど)
|
68
|
-
|
69
|
-
より詳細な情報
|