質問編集履歴
3
コードの修正
title
CHANGED
File without changes
|
body
CHANGED
@@ -15,9 +15,9 @@
|
|
15
15
|
子テーマを有効化した後、ページのソースを確認してみると、
|
16
16
|
以下のように親、子の順でstyle.cssが読み込まれているのですが、子テーマを有効化させてしまうと、親テーマ有効化時のようなレイアウトにはなりません。あくまで、現状のサイトレイアウトを維持して、それに対して子テーマを使用して追加を行いたいです。
|
17
17
|
|
18
|
-
<link rel='stylesheet' id='parent-style-css' href='http://
|
18
|
+
<link rel='stylesheet' id='parent-style-css' href='http://abc.com/wp-content/**themes/enfold/style.css**?ver=5.4.1' type='text/css' media='all' />
|
19
19
|
|
20
|
-
<link rel='stylesheet' id='child-style-css' href='http://
|
20
|
+
<link rel='stylesheet' id='child-style-css' href='http://abc.com/wp-content/**themes/enfold-child/style.css**?ver=5.4.1' type='text/css' media='all' />
|
21
21
|
|
22
22
|
親テーマ内にある追加CSS情報も子テーマへ反映されていますよね?
|
23
23
|
|
2
コードの修正
title
CHANGED
File without changes
|
body
CHANGED
@@ -9,7 +9,6 @@
|
|
9
9
|
子テーマには、
|
10
10
|
・functions.php
|
11
11
|
・screenshot.png
|
12
|
-
・single.php
|
13
12
|
・style.php
|
14
13
|
が入っています。
|
15
14
|
|
@@ -49,81 +48,4 @@
|
|
49
48
|
Template:enfold
|
50
49
|
Version:4.6
|
51
50
|
*/
|
52
|
-
```
|
53
|
-
|
54
|
-
```php
|
55
|
-
<?php
|
56
|
-
if ( !defined('ABSPATH') ){ die(); }
|
57
|
-
|
58
|
-
global $avia_config;
|
59
|
-
|
60
|
-
/*
|
61
|
-
* get_header is a basic wordpress function, used to retrieve the header.php file in your theme directory.
|
62
|
-
*/
|
63
|
-
get_header();
|
64
|
-
|
65
|
-
$title = __('Blog - Latest News', 'avia_framework'); //default blog title
|
66
|
-
$t_link = home_url('/');
|
67
|
-
$t_sub = "";
|
68
|
-
|
69
|
-
if(avia_get_option('frontpage') && $new = avia_get_option('blogpage'))
|
70
|
-
{
|
71
|
-
$title = get_the_title($new); //if the blog is attached to a page use this title
|
72
|
-
$t_link = get_permalink($new);
|
73
|
-
$t_sub = avia_post_meta($new, 'subtitle');
|
74
|
-
}
|
75
|
-
|
76
|
-
if( get_post_meta(get_the_ID(), 'header', true) != 'no') echo avia_title(array('heading'=>'strong', 'title' => $title, 'link' => $t_link, 'subtitle' => $t_sub));
|
77
|
-
|
78
|
-
do_action( 'ava_after_main_title' );
|
79
|
-
|
80
|
-
?>
|
81
|
-
|
82
|
-
<div class='container_wrap container_wrap_first main_color <?php avia_layout_class( 'main' ); ?>'>
|
83
|
-
|
84
|
-
<div class='container template-blog template-single-blog '>
|
85
|
-
|
86
|
-
<main class='content units <?php avia_layout_class( 'content' ); ?> <?php echo avia_blog_class_string(); ?>' <?php avia_markup_helper(array('context' => 'content','post_type'=>'post'));?>>
|
87
|
-
|
88
|
-
<?php
|
89
|
-
/* Run the loop to output the posts.
|
90
|
-
* If you want to overload this in a child theme then include a file
|
91
|
-
* called loop-index.php and that will be used instead.
|
92
|
-
*
|
93
|
-
*/
|
94
|
-
get_template_part( 'includes/loop', 'index' );
|
95
|
-
|
96
|
-
$blog_disabled = ( avia_get_option('disable_blog') == 'disable_blog' ) ? true : false;
|
97
|
-
|
98
|
-
if(!$blog_disabled)
|
99
|
-
{
|
100
|
-
//show related posts based on tags if there are any
|
101
|
-
get_template_part( 'includes/related-posts');
|
102
|
-
|
103
|
-
//wordpress function that loads the comments template "comments.php"
|
104
|
-
comments_template();
|
105
|
-
}
|
106
|
-
?>
|
107
|
-
|
108
|
-
<!--end content-->
|
109
|
-
</main>
|
110
|
-
|
111
|
-
<?php
|
112
|
-
$avia_config['currently_viewing'] = "blog";
|
113
|
-
//get the sidebar
|
114
|
-
get_sidebar();
|
115
|
-
|
116
|
-
|
117
|
-
?>
|
118
|
-
|
119
|
-
|
120
|
-
</div><!--end container-->
|
121
|
-
|
122
|
-
</div><!-- close default .container_wrap element -->
|
123
|
-
|
124
|
-
|
125
|
-
<?php
|
126
|
-
get_footer();
|
127
|
-
|
128
|
-
|
129
51
|
```
|
1
タイトルの変更
title
CHANGED
@@ -1,1 +1,1 @@
|
|
1
|
-
WordPressの子テーマを有効化すると、
|
1
|
+
WordPressの子テーマを有効化すると、レイアウトが崩れてしまいます。
|
body
CHANGED
File without changes
|