Viewing 14 replies - 1 through 14 (of 14 total)
  • HI @jonast92,

    It would most probably an issue in your PHP that is causing an error at a certain point, before it renders any content.

    If you update this line in wp-config.php (which is in your root) directory.

    Change:

    ‘define(‘WP_DEBUG’, false);’

    to

    ‘define(‘WP_DEBUG’, true);’

    this will out put the error to the page and let you know on what line in what file the error is being produced.

    Matt

    Did you make any edits to the theme prior to the unexpected change? Can you please share some context as to what you might have been doing on the site before the issue arose?

    Thread Starter WPBeginner

    (@jonast92)

    Ok, now I have changed the “WP_DEBUG”, and my page looks like this: https://www.sportsekstra.no/om-oss/

    Are all those errors?

    It is impossible that I have made all those mistakes since the last time the page was up and running…

    this is the issue:

    ‘Parse error: syntax error, unexpected ‘}’ in /home/2/s/sportsekstra/www/wp-content/themes/ExpressNews/post-page.php on line 21′

    You can change the WP Debug back to false now….

    If you would like to paste the post-page.php in here I will have a look.

    Thread Starter WPBeginner

    (@jonast92)

    Ok, so what am I going to do with ‘}’? I tried to remove it, but nothing happened…

    Thread Starter WPBeginner

    (@jonast92)

    Here is my post-page.php:

    <?php global $theme; ?>

    <div <?php post_class(‘post page clearfix’); ?> id=”post-<?php the_ID(); ?>”>
    <h2 class=”title”><?php the_title(); ?></h2>

    <?php if(is_user_logged_in()) { ?>
    <div class=”postmeta-primary”><span class=”meta_edit”><?php edit_post_link(); ?></span></div>
    <?php } ?>

    <div class=”entry clearfix”>

    <?php
    if(has_post_thumbnail()) {
    the_post_thumbnail(
    array($theme->get_option(‘featured_image_width_single’), $theme->get_option(‘featured_image_height_single’)),
    array(“class” => $theme->get_option(‘featured_image_position_single’) . ” featured_image”)
    )
    }
    ?>

    <?php
    the_content(”);
    wp_link_pages( array( ‘before’ => ‘<p>‘ . __( ‘Pages:’, ‘themater’ ) . ‘‘, ‘after’ => ‘</p>’ ) );
    ?>

    </div>

    </div><!– Page ID <?php the_ID(); ?> –>

    Try just putting ‘;’ after the ), before the }

    eg

    ‘<?php
    if(has_post_thumbnail()) {
    the_post_thumbnail(
    array($theme->get_option(‘featured_image_width_single’), $theme->get_option(‘featured_image_height_single’)),
    array(“class” => $theme->get_option(‘featured_image_position_single’) . ” featured_image”)
    );
    }
    ?>’

    Thread Starter WPBeginner

    (@jonast92)

    Ah, thanks a lot! That worked perfectly!

    Its a shame that such a little thing can make all those problems.. (:

    Thread Starter WPBeginner

    (@jonast92)

    Some of my pages is kind of messed up now..

    Example this one: https://www.sportsekstra.no/bundesliga/

    Why are my widgets falling to the bottom? I want them to the top of the page..

    Thread Starter WPBeginner

    (@jonast92)

    its like the widget area on the right side is gone, and the main content is floating all the way out on the right side..

    I don’t think its related to the same issue.

    I think it is the clearfix class that you have wrapped around the content. That class will be making sure that the sidebar doesn’t float up next to the main content.

    Thread Starter WPBeginner

    (@jonast92)

    ok. Sorry, but what is “the clearfix class” that I have wrapped around my content? and how do I get rid of it? (:

    on this line (the 2nd line) in post-page.php

    <div <?php post_class('post page clearfix'); ?> id="post-<?php the_ID(); ?>">

    You are adding a clearfix class the that div.

    It is using CSS to make sure that it sits completely on its own line and neighbouring divs are pushed either above or below.

    Try removing the word ‘clearfix’ from that line and see what happens.

    It may cause un expected changes on other pages around the site though

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘My pages went blank’ is closed to new replies.