-
AuthorPosts
-
March 9, 2015 at 10:19 pm #223910
Hey AW,
Please try removing the spaces before and after php tags so it would be like
<?php // // Template Name: Artiklar // ?>
See also the links below for other factors
http://codex.wordpress.org/FAQ_Troubleshooting#How_do_I_solve_the_Headers_already_sent_warning_problem.3F
http://stackoverflow.com/questions/8028957/how-to-fix-headers-already-sent-error-in-phpThanks.
March 10, 2015 at 4:26 am #224104Tried them all on one of the child themes with no luck.
Why does it say that the x-head.min calls an undefined function? If i change the x-head.min.js to x-site-head.js (with the same name as the minified) I don’t get an error. However the content is still blank and drop down menus in the top bar does not work.
There must be something else wrong since the child theme file can be completely empty but still generate an error…?
March 10, 2015 at 6:11 am #224142Hi,
Upon checking your site, I can see it is temporarily disabled
http://screencast.com/t/QuFdIsGFkZKF
Please check and let us know.
Thanks
March 10, 2015 at 5:31 pm #224675Now I have cleaned everything to start fresh, with hopes of finding the source of the problem. The site has been down a month and I’ve spent weeks. This has to be the last try unfortunantely.
With a clean install of WP, new upload of the latest X and upload of the latest x-child I still get the same error of an uncaught type error in x-head.min.js.
template-nyheter.php placed directly under x-child/ contains the following (I have made no other changes to anything else):
<?php // // Template Name: Nyheter // get_header(); ?>
With this I get the same bloody error in development console in Chrome. My hopes just went down in the basement…
Maybe this is not any problem or what is the solution if it is? If not how should I go on isolating why the whole page crashes?
March 11, 2015 at 2:27 am #224843Hi,
I would like to check again but the ftp login you have provided no longer works.
Can you please check and let us know.
At the mean time you can try removing the closing php tag ?>
<?php // // Template Name: Nyheter // get_header();
Hope that helps.
March 11, 2015 at 7:45 am #225008This reply has been marked as private.March 11, 2015 at 9:16 am #225074Hi There,
Upon checking your FTP Source, I can see that you’re usingx_integrity_main_content_class()
which does not exist in X theme.
It should be:x_main_content_class()
;
I’d already changed this for you, please take a look at template-news.php file locates in the child theme.
Thanks.March 17, 2015 at 5:19 am #229035This reply has been marked as private.March 17, 2015 at 7:42 am #229121Hi There,
I solved these issues for you, everything is working fine right now.
Please take a look at your website.
Regards!March 17, 2015 at 3:59 pm #229507Great, what a happy news! Now it is almost back as it used to. The child theme home was divided into columns, but now every post takes up the whole page like 1/1 column. I added the @import for integrity-light.css. but the site remained unaffected.?
March 17, 2015 at 10:34 pm #229738Hi there,
You’re using custom templates, and here the code for your home page.
<?php // // Template Name: Standard hem // ?> <?php get_header(); ?> <div class="x-container-fluid max width offset cf"> <div class="<?php x_main_content_class(); ?>" role="main"> <div class="x-column two-thirds"> <h2 class="h3 mts">Nyheter</h3> <div class="x-recent-posts vertical home-custom cf" data-fade="false"> <?php $output = ''; $q_1 = new WP_Query( array( 'orderby' => 'date', 'post_type' => 'post', 'posts_per_page' => 3, 'category_name' => 'nyheter' ) ); if ( $q_1->have_posts() ) : while ( $q_1->have_posts() ) : $q_1->the_post(); if ( ! has_post_thumbnail() ) { $image_output = ''; $image_output_class = 'no-image'; } else { $image_output = '<div class="x-recent-posts-img">' . get_the_post_thumbnail( get_the_ID(), 'entry-' . get_theme_mod( 'x_stack' ) . '-cropped', NULL ) . '</div>'; $image_output_class = 'with-image'; } $output .= '<a class="x-recent-post3 ' . $image_output_class . '" href="' . get_permalink( get_the_ID() ) . '" title="' . esc_attr( sprintf( __( 'Permalink to: "%s"', '__x__' ), the_title_attribute( 'echo=0' ) ) ) . '">' . '<article id="post-' . get_the_ID() . '" class="' . implode( ' ', get_post_class() ) . '">' . $image_output . '<div class="x-recent-posts-content">' . '<h3 class="h-recent-posts">' . get_the_title() . '</h3>' . '<span class="x-recent-posts-date">' . get_the_date() . '</span>' . '<span class="x-recent-posts-excerpt">' . get_the_excerpt() . '</span>' . '</div>' . '</article>' . '</a>' ; endwhile; endif; wp_reset_postdata(); echo $output; ?> </div> </div> <div class="x-column one-third last"> <h2 class="h3 mts">Artiklar</h3> <div class="x-recent-posts vertical home-custom cf" data-fade="false"> <?php // Artiklar $output = ''; $q_2 = new WP_Query( array( 'orderby' => 'date', 'post_type' => 'post', 'posts_per_page' => 4, 'category_name' => 'artiklar' ) ); if ( $q_2->have_posts() ) : while ( $q_2->have_posts() ) : $q_2->the_post(); if ( ! has_post_thumbnail() ) { $image_output = ''; $image_output_class = 'no-image'; } else { $image_output = '<div class="x-recent-posts-img">' . get_the_post_thumbnail( get_the_ID(), 'entry-' . get_theme_mod( 'x_stack' ) . '-cropped', NULL ) . '</div>'; $image_output_class = 'with-image'; } $output .= '<a class="x-recent-post3 ' . $image_output_class . '" href="' . get_permalink( get_the_ID() ) . '" title="' . esc_attr( sprintf( __( 'Permalink to: "%s"', '__x__' ), the_title_attribute( 'echo=0' ) ) ) . '">' . '<article id="post-' . get_the_ID() . '" class="' . implode( ' ', get_post_class() ) . '">' . $image_output . '<div class="x-recent-posts-content">' . '<h3 class="h-recent-posts">' . get_the_title() . '</h3>' . '<span class="x-recent-posts-date">' . get_the_date() . '</span>' . '</div>' . '</article>' . '</a>'; endwhile; endif; wp_reset_postdata(); echo $output; ?> </div> </div> </div> <!-- end .x-main --> <?php get_sidebar(); ?> </div> <!-- end .x-container-fluid.max.width.offset.cf --> <?php get_footer(); ?>
1. You’re still using x-container-fluid which should be x-container only.
Change this
<div class="x-container-fluid max width offset cf">
to this
<div class="x-container max width offset cf">
Apply this to all possible occurences.
2. There are no columns, you’re using a source code from recent posts shortcode and it’s set as vertical.
<div class="x-recent-posts
verticalhome-custom cf" data-fade="false">
So, I’m not really sure about the columns, since recent posts shortcode uses horizontal for 4 columned items.
3. You can include another
<a>
inside another<a>
. That will cause issue, and that is when adding read more link usingget_the_excerpt()
Change this,
. '<span class="x-recent-posts-excerpt">' . get_the_excerpt() . '</span>'
into this
. '<span class="x-recent-posts-excerpt">' . strip_tags(get_the_excerpt()) . '</span>'
Your issues are coming from your customization. You may want to consult to a developer for better assistance.
Thanks!
March 21, 2015 at 12:24 pm #232447This was great, thanks!
Today I logged in and got a notice to update X once again, so I did. The result was frightening. Once again the header is full of warnings about width.php. What did you do last time to clear this and why is it happening every time I update?
Regarding the layout of the page (your point 2):
1) The content previously had a white background surrounding it. This disappeared.
2) Yes, the layout of within each column is vertical, but before the updates the <div class=”x-column two-thirds”><div class=”x-recent-posts vertical home-custom cf” data-fade=”false”></div></div> and <div class=”x-column one-third last”></div> was placed next to each other horizontally. Now they share the same width and are placed vertically after each other.
3) The sidebar is gone, even from within the wp-admin page.March 22, 2015 at 3:43 pm #232948Hi there,
We did set
define('WP_DEBUG', false);
at your site’s wp-config.php. This is only possible by editing the file, so update should have no control. It’s set back to true (define('WP_DEBUG', true);
)I did set it to false again and those warning and notices are now gone.
1. You’re using custom templates which lacks of class name and elements to achieve the look of a default template. You may add this css at your customizer’s custom css.
.page-template-template-home page-template-template-home-php .site > .x-container.max { background-color: #fff; }
2. Okay, then replace one-third with x-1-3
3. You probably switched theme (eg. to child themes). Menus and widgets will be reset when doing that, but will not be deleted. They will be just inactive. Go to Admin > Appearance > Widgets and scroll down, find inactive widgets and place them again where they are supposed to be.
Thanks.
-
AuthorPosts