Skip Navigation

[Resolved] Content Templates for Single Page View Is Messing Up HTML Structure

This thread is resolved. Here is a description of the problem and solution.

Problem: My site's sidebar is rendered below the main content instead of beside it

Solution: Disable the synved social buttons plugin, make sure no content is duplicated in your page source, make sure your HTML is valid and elements are closed appropriately

Relevant Documentation: N/A

This support ticket is created 7 years, 2 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 4 replies, has 2 voices.

Last updated by jeffK-4 7 years, 2 months ago.

Assisted by: Christian Cox.

Author
Posts
#489156
Sidebar Incorrect.png
Sidebar Correct.png

I am trying to: Display a single post so that it appears with the sidebar in the proper place.

I visited this URL:hidden link
---- Or any single post template on the site

I expected to see: The sidebar in the correct place (like the second screenshot attached)

Instead, I got: The sidebar is pushed below the content div. When I run it through a validator it tells me that there are some unclosed tags that might be causing the error:
hidden link

This is only occurring on single post template pages (all of which I have coded differently for their post types, so I'm not sure that I could've made an unclosed div mistake on all of them). This leads me to believe that something internal to wordpress views is injecting an extra unneeded opening div tag. This then messes up the site structure for single post views.

Thanks for your help!

#489244

Hi there, can you tell me where the <aside id="sidebar"> element is supposed to exist in your DOM structure?

Right now here is what I see:
body
- #pagewrap
---#headerwrap
---#body
-----#layout
-------#content
---------#post-3961
---#sidebar

#headerwrap, #sidebar and #body are siblings, and are all children of #pagewrap. Is this correct? If not, what is the appropriate structure?

#489271

I think that it should be within the layout container following the post:

- #pagewrap
---#headerwrap
---#body
-----#layout
-------#content
---------#post-3961
-------#sidebar

#489277

You have some duplicated content in your page output, which seems to indicate you have duplicated parts of your template or page content somehow. Take a look at the page source at line 425. The synved social buttons start here, followed by:

<div id="themify_builder_content-3961" data-postid="3961" class="themify_builder_content themify_builder_content-3961 themify_builder themify_builder_front">

Scroll down to line 433, and the same synved buttons are here again, followed by a duplicate div:

<div id="themify_builder_content-3961" data-postid="3961" class="themify_builder_content themify_builder_content-3961 themify_builder themify_builder_front">

So I don't think the issue is extra div tags, the issue is duplicate content.

#489295

Thanks for your help on this - I deactivated the plugin and it seems to be good now.

Thanks again!

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.