U
U
Urbina @Urbina2018-08-17 11:59:14
WordPress
Urbina @Urbina, 2018-08-17 11:59:14

Blank screen instead of admin panel?

And what could be wrong with the function.php file? If I delete it, then I go to the admin panel using the link name.su/wp-admin/. If I return to the place, then this link is a clean white screen. Child theme of Twenty Seventeen

<?php
// Грузит Быстрее чем @import
add_action( 'wp_enqueue_scripts', 'my_child_theme_scripts' );
function my_child_theme_scripts() {
  wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );
}

include( plugin_dir_path( __FILE__ ) . 'content-views.php');

  register_sidebar( array(
    'name'          => __( 'Primary Sidebar', 'twentyfourteen' ),
    'id'            => 'sidebar-1',
    'description'   => __( 'Main sidebar that appears on the left.', 'twentyfourteen' ),
    'before_widget' => '<aside id="%1$s" class="widget %2$s">',
    'after_widget'  => '</aside>',
    'before_title'  => '<p class="widget-title">',
    'after_title'   => '</p>',
  ) );
  register_sidebar( array(
    'name'          => __( 'Content Sidebar', 'twentyfourteen' ),
    'id'            => 'sidebar-2',
    'description'   => __( 'Additional sidebar that appears on the right.', 'twentyfourteen' ),
    'before_widget' => '<aside id="%1$s" class="widget %2$s">',
    'after_widget'  => '</aside>',
    'before_title'  => '<p class="widget-title">',
    'after_title'   => '</p>',
  ) );
  register_sidebar( array(
    'name'          => __( 'Footer Widget Area', 'twentyfourteen' ),
    'id'            => 'sidebar-3',
    'description'   => __( 'Appears in the footer section of the site.', 'twentyfourteen' ),
    'before_widget' => '<aside id="%1$s" class="widget %2$s">',
    'after_widget'  => '</aside>',
    'before_title'  => '<p class="widget-title">',
    'after_title'   => '</p>',
  ) );


// Область виджетов в шапке
    register_sidebar(array(
        'name' => __('Виджеты для шапки'),
        'id' => 'header-widget-area',
        'description' => __('Виджеты в шапке, например для баннера'),
        'before_widget' => '',
        'after_widget' => '',
        'before_title' => '<p><a href="#">',
        'after_title' => '</a></p>',
    ));

// Область виджетов внутри поста
    register_sidebar(array(
        'name' => __('Виджеты на странице поста'),
        'id' => 'postin-widget-area',
        'description' => __('Виджеты на странице поста'),
        'before_widget' => '',
        'after_widget' => '',
        'before_title' => '<p><a href="#">',
        'after_title' => '</a></p>',
    ));

// Область виджетов на странице архивов
    register_sidebar(array(
        'name' => __('Виджеты для страницы архивов'),
        'id' => 'arhive-widget-area',
        'description' => __('Виджеты для страницы архивов'),
        'before_widget' => '',
        'after_widget' => '',
        'before_title' => '<p><a href="#">',
        'after_title' => '</a></p>',
    ));
include( plugin_dir_path( __FILE__ ) . 'content-views.php');

function the_breadcrumb() {
    global $post;
    echo '<ul id="breadcrumbs">';
    if (!is_home()) {
        echo '<li><a href="';
        echo get_option('home');
        echo '">';
        echo 'Главная';
        echo '</a></li><li class="separator"> / </li>';
        if (is_category() || is_single()) {
            echo '<li>';
            the_category(' </li><li class="separator"> / </li><li> ');
            if (is_single()) {
                echo '</li><li class="separator"> / </li><li>';
                the_title();
                echo '</li>';
            }
        } elseif (is_page()) {
            if($post->post_parent){
                $anc = get_post_ancestors( $post->ID );
                $title = get_the_title();
                foreach ( $anc as $ancestor ) {
                    $output = '<li><a href="'.get_permalink($ancestor).'" title="'.get_the_title($ancestor).'">'.get_the_title($ancestor).'</a></li> <li class="separator">-</li>' . $output ;
                }
                echo $output;
                echo '<strong title="'.$title.'"> '.$title.'</strong>';
            } else {
                echo '<li><strong> '.get_the_title().'</strong></li>';
            }
        }
    }
    elseif (is_tag()) {single_tag_title();}
    elseif (is_day()) {echo"<li>Архивы за "; the_time('F jS, Y'); echo'</li>';}
    elseif (is_month()) {echo"<li>Архивы за "; the_time('F, Y'); echo'</li>';}
    elseif (is_year()) {echo"<li>Архивы за "; the_time('Y'); echo'</li>';}
    elseif (is_author()) {echo"<li>Архивы автора"; echo'</li>';}
    elseif (isset($_GET['paged']) && !empty($_GET['paged'])) {echo "<li>Архивы блога"; echo'</li>';}
    elseif (is_search()) {echo"<li>Результаты поиска"; echo'</li>';}
    echo '</ul>';
}
?>

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
Orkhan Hasanli, 2018-08-17
@azerphoenix

Hello!
1) turn on wp_debug and look for errors
2) I suspect that the error lies somewhere here:

include( plugin_dir_path( __FILE__ ) . 'content-views.php');
Firstly it is connected 2 times

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question