• Hi,
    I am porting my website theme to my blog too.
    At the moment I am at an early stage, but the code passes the w3c validator without issues (the sidebar has yet to be validated, but if I use a static sidebar full of casual words, the result is the same).
    However if I add a share plugin (such ass addtoany or sexybookmarks or oknotizie) at the end or at the beginning of a post, the layout is screwed up and the post ends where the right sidebar ends.
    However if I embed the plugin into a <span> tag instead of the default <div> used in many plugins, there isn’t any problem.
    It may be a little bit hard to explain, but as you can see here LINK I modified the <div> tags of the addtoanyplugin, while the oknotizie plugin still uses the <div> tags.
    The addtoany plugin is displayed correctly, while the oknotizie plugin is displayed exactly where the right sidebar ends.

    Any hints?
    If you need any source code, just ask me and I’ll display it here (however there shouldn’t be any issue in the code as it validates and there isn’t ANY issue if I don’t use any share plugin at the end of the posts).
    Useless to say, the issue is present with ANY plugin added at the end of the post, so the problem is not related to a specific plugin.

    Thanks

Viewing 7 replies - 1 through 7 (of 7 total)
  • Re-read post answer I wrote was not correct!

    David

    Thread Starter flapane

    (@flapane)

    Hi adeptris,
    yes, both div and styles for the sidebar are present and correct, with id=sidebar and the call is made in the sidebar.php file.
    If you see the link I posted above, you should be able to see the html code.
    I don’t know why the issue is present only when you add a plugin at the end of the post (such as a share plugin).
    I have been investigating since days and couldn’t find any solution.

    Thanks

    I have had another look and it could be the construction of the website and how the plugin is injected.

    You have everything inside container and content, that might be a problem

    Site-title, site-description, header-banner would normally go into a header.php, called in the page files with get_header(), footer called get_footer().

    So you would have something like
    div.body
    -div.sheet
    –div.header
    –div.container
    —div.sidebar
    —div.content
    —-div.posts
    –div.footer
    -close.sheet
    close.body

    HTH

    David

    Thread Starter flapane

    (@flapane)

    Hi,
    which version did you see? I am afraid that you saw the old theme (container and content) which is still active now, while I am working on the theme I posted above.

    Sorry, here’s the correct link LINK for people without the login cookie.

    Thanks

    Hi,
    What I am seeing with FireBug is:

    <div class="main-column">
       <div id="post-731"></div>
       <div class="box">
          <h1 class="head">
             <!-- post header content -->
          </h1>
          <div class="pad">
             <!-- post content -->
          </div>
       </div>

    The plugins add the code inside the ‘post’ div, so it still looks like the structure is not correct.

    Maybe the box should be wrapped inside the post div?

    <div class="main-column">
       <div id="post-731">
          <div class="box">
             <h1 class="head">
                <!-- post header content -->
             </h1>
             <div class="pad">
                <!-- post content -->
             </div>
          </div> <!-- close box -->
       </div> <!-- close post -->

    HTH

    David

    Thread Starter flapane

    (@flapane)

    Hi,
    for whatever reason the post div was empty:
    <div <?php post_class(); ?> id=”post-<?php the_ID(); ?>”></div>

    Now the </div> is placed right before the <?php endwhile; ?>, just like in the default theme, and everything is inside the ‘post’ div.
    However, nothing changed.
    Firebug –> https://i.imgur.com/HNLfH.jpg https://i.imgur.com/NrJV5.jpg

    Thanks

    edit: I’ve done a comparation with the default WP theme ( https://www.flapane.com/blog/?preview_theme=default ), and I couldn’t find any difference in the scheme.

    Thread Starter flapane

    (@flapane)

    bump

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Every share plugin at the end of the post screws up the layout’ is closed to new replies.