试图安装这个儿童主题 - wordpress失去理智

时间:2018-03-29 18:38:55

标签: php css wordpress

我正在为我的网站安装一个新主题。我正在添加一个子主题但由于某种原因它一直出错。我正在使用wordpress。我将主题radiate上传到bluehost文件管理器页面。然后我创建了另一个名为radiate-child的文件夹。在子主题文件夹中是style.css和functions.php。两个文件夹都存在于wp-content / themes文件夹中,所以我知道它们位于正确的位置。最初出现了儿童主题但是wordpress没有预览,并且激活它使网站上的每个页面(后端和前端)都重定向到500个错误标识。

这里是functions.php代码

<?php

    add_action( 'wp_enqueue_scripts', 'my_theme_enqueue_styles' );
    function my_theme_enqueue_styles() {
        wp_enqueue_style( 'radiate-style', get_template_directory_uri() . '/style.css' );

    }
    ?>
    <?php
    function my_theme_enqueue_styles() {

        $parent_style = 'radiate-style'; // This is 'radiate_style' for the Radiate theme.

        wp_enqueue_style( $parent_style, get_template_directory_uri() . '/style.css' );
        wp_enqueue_style( 'radiate-child',
            get_stylesheet_directory_uri() . '/style.css',
            array( 'radiate-child' ),
            wp_get_theme()->get('Version')
        );
    }
    add_action( 'wp_enqueue_scripts', 'my_theme_enqueue_styles' );
    ?>

所以我摆弄了上面的functions.php - 不确定它是否正确。然后我跳到我的style.css页面并对标题进行了一些编辑,现在在wordpress主题面板中,它表示父主题不存在。这对我来说非常混乱,因为在同一个面板中是主题Radiate。事实上,我将它设置为我的主动主题只是为了看它是否存在。当我转到主题错误时,它为我提供了安装父主题的选项。当我点击安装它说主题无法安装,因为目标文件夹已经存在。我听说过儿童主题标题中的错误搞砸了,所以这里是我的。

/*
 Theme Name:   Radiate Child
 Theme URI:    https://themegrill.com/themes/radiate/
 Description:  Radiate Child Theme
 Author:       ThemeGrill
 Author URI:   https://themegrill.com/
 Template:     Radiate
 Version:      1.0.0
 License:      GNU General Public License v2 or later
 License URI:  http://www.gnu.org/licenses/gpl-2.0.html
 Tags:         light, dark, two-columns, right-sidebar, responsive-layout, accessibility-ready
 Text Domain:  radiate-child
*/

这是原始的

/*
Theme Name: Radiate
Theme URI: https://themegrill.com/themes/radiate/
Author: ThemeGrill
Author URI: https://themegrill.com/
Description: Radiate is a clean, creative and light retina ready responsive blogging theme supporting parallax header image. It integrates primary color option, custom background, custom css and few other features through WordPress customizer. The theme is translation ready and you can get free support on https://themegrill.com/support-forum. View demo at https://demo.themegrill.com/radiate.
Version: 1.2.7
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: radiate
Domain Path: /languages/
Tags: two-columns, right-sidebar, custom-header, flexible-header, custom-background, custom-menu, custom-colors, post-formats, sticky-post, threaded-comments, translation-ready, featured-images, rtl-language-support, theme-options, blog, e-commerce

Resetting and rebuilding styles have been helped along thanks to the fine work of
Eric Meyer http://meyerweb.com/eric/tools/css/reset/index.html
along with Nicolas Gallagher and Jonathan Neal http://necolas.github.com/normalize.css/
and Blueprint http://www.blueprintcss.org/
*/


/* =Reset

旁注:当我选择子主题的实时预览时(之前在主题面板中可见)并且辐射它会加载一个空白页面,顶部只显示“google analytics”。激活主题时不会发生这种情况。

编辑:将模板名称更改为“辐射”,使其显示在主题面板中。单击实时预览或激活主题会将所有内容变为500错误。

编辑2:这是我在error_log中获得的代码

PHP Warning: PHP Startup: Unable to load dynamic library '/opt/cpanel/ea-php56/root/usr/lib64/php/modules/pdo_pgsql.so' - /opt/cpanel/ea-php56/root/usr/lib64/php/modules/pdo_pgsql.so: cannot open shared object file: No such file or directory in Unknown on line 0

0 个答案:

没有答案