Page template not displaying properly

Hi Guys, I need some help re: Wordpress, php and Bootstrap

My homepage is broken!

while this page: works fine. This is despite both pages using page templates which are essentially the same. full-width-slider-page.php and full-width-offer-page.php respectively.

I don’t understand why:

  • The footer on the homepage is now stretched full width.
  • Why the hompage content is wrapped in the blue special offer div.

The ultimate goal is to insert: <?php if(dynamic_sidebar('full_width_slider')) : else : endif; ?>
into full-width-slider-page.php or it’s included template part?? in order to display a slider widget.
The new widget area has been registered in functions.php and gets pulled in fine apart from these broken layout issues.
I have commented out the php block until I can get the layout stable.
If anyone can help I’d really appreciate it.

In our browser, right-click and select “Inspect Element(Q)”, scroll down to the footer and it is possible to edit the HTML script. Any changes are immediately rendered.

  <!-- div class="wide" -->
    <p class="visible-sm visible-md visible-lg">Special Brake offer!</p>
    <p class="visible-xs mobile-offer-text">Special Brake offer!</p>
  <!-- /div -->

Yes, thanks for that, I’m aware of inspecting the element, but I’m still completely baffled as to why the layout is broken.

1 Like

Maybe if you fixed some of the mark-up it would improve things?

Error: End tag div seen, but there were open elements.
Error: Unclosed element article.
Error: Unclosed element main.
Error: Stray end tag article.
Error: Stray end tag main.
Error: End tag for body seen, but there were unclosed elements.
Error: Unclosed element div.


Thanks Guys, that was it, a pesky stray div tag.

Much obliged!

Check if right header is called. could be.
Same happened me few days ago. This is a usual problem with custom themes. My site is now working fine.
what happened was, i called header-inner.php instead of header.php which didnot have the required css files in it.

Post edited by cpradio: removed unnecessary link

1 Like

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.