If I had hair, it would be ripped out

12 replies
  • WEB DESIGN
  • |
Can someone please give me a quick hand? I have been having an issue with image alignment all of a sudden and for the life of me I cannot figure it out. And it is driving me batty.

Whenever I insert like a row or two of images, they are straight. I save. The page reloads and that first row of images like each one steps down a row. If you switch over to html, there are paragraph and line breaks inserted between those images. No matter what I do, they come back whenever I save or I think even when I switch between visual and html.

This is wordpress btw. Something with my theme code maybe? Tiny MCE?

I don't know the rules of posting links so... Has anyone experienced this before? Did you solve it? If so, how dammit?

Thank you.
#hair #ripped
  • Profile picture of the author Jay Carter
    Try use fiverr.com.

    There are maybe someone who can help you for 5 dollars. Just search "Wordpress issue"
    Signature

    - Jay

    {{ DiscussionBoard.errors[8622210].message }}
  • Profile picture of the author clickbump
    The wordpress editor is likely inserting paragraph tags based on the natural line breaks within your content. If you can switch over to the "HTML" source view inside the editor, you can see what the core code looks like.

    If you'd like, you can copy and paste the relevant content back to here and perhaps we can help sort it out. A URL would be helpful too.
    Signature
    {{ DiscussionBoard.errors[8624533].message }}
    • Profile picture of the author huskieswin
      Originally Posted by clickbump View Post

      The wordpress editor is likely inserting paragraph tags based on the natural line breaks within your content. If you can switch over to the "HTML" source view inside the editor, you can see what the core code looks like.

      If you'd like, you can copy and paste the relevant content back to here and perhaps we can help sort it out. A URL would be helpful too.
      Thank you for your reply.

      I know it is inserting them, not only do they appear after you save/update, they appear even when you switch between visual and html views.

      Also, it only seems to happen to a first row of images. The 2nd rows have all been aligned.

      Here is a chunk of code:

      [caption id="attachment_3446" align="alignleft" width="150"]<a href="http://www.doyoubjj.com/gameness-pearl-weave/"><img class="size-thumbnail wp-image-3446 " alt="Gameness Pearl" src="http://www.doyoubjj.com/wp-content/uploads/2013/03/Gameness-Pearl-Weave-Blue-BJJ-Gi-4-150x150.jpg" width="150" height="150" /></a> <span style="color: #0000ff;">Gameness Pearl</span><br /><span style="color: #0000ff;">Save 15-25% - $120 - 140</span><br /><span style="color: #0000ff;">White, Blue, Black</span>[/caption]
      <p>&nbsp;</p>
      [caption id="attachment_5028" align="alignleft" width="150"]<a href="http://www.doyoubjj.com/gameness-feather-gi-save-15-light-durable-sweet-starter-gi/"><img class="size-thumbnail wp-image-5028 " alt="gameness feather" src="http://www.doyoubjj.com/wp-content/uploads/2013/09/gameness-feather-150x150.jpg" width="150" height="150" /></a> <span style="color: #0000ff;">Gameness Feather</span><br /><span style="color: #0000ff;">Save 15-25% - $155-175</span><br /><span style="color: #0000ff;">White, Blue, Black</span>[/caption]
      <p>&nbsp;</p>
      {{ DiscussionBoard.errors[8625218].message }}
  • Profile picture of the author clickbump
    Try adding this to your functions.php file:

    PHP Code:
    <?php remove_filter ('the_content''wpautop'); ?>
    Signature
    {{ DiscussionBoard.errors[8626918].message }}
    • Profile picture of the author huskieswin
      Originally Posted by clickbump View Post

      Try adding this to your functions.php file:

      PHP Code:
      <?php remove_filter ('the_content''wpautop'); ?>
      I am kind of a newb when it comes to changing the php files. Where exactly would I place that within the functions file?
      {{ DiscussionBoard.errors[8627172].message }}
  • Profile picture of the author Graham Dytor
    I've dealt with that before, and have found that simply saving from the HTML editor fixes the problem.
    {{ DiscussionBoard.errors[8628595].message }}
    • Profile picture of the author huskieswin
      I think I have found the cause of the problem, I have no idea why it is doing what it does but...

      After disabling TinyMCE editor, then going back to html view and deleting the <p>'s & <br's>, then saving, the images are back to normal.

      The poster above me who said to save from html, that did not work, I tried that several times before posting.

      And to the poster who suggested I insert this code,
      ?php remove_filter ('the_content', 'wpautop'); ?

      I don't know if it was my site (the way my theme interacted with your code), where I put it in the functions.php file, or if you were playing a joke on me but that messed some shit up. I had to call my hosting company after doing it because as soon as I hit the update button... blank screen.

      Nothing worked. No dashboard, no login, no statistics, no site. The hosting company went back like a half hour and restored it, but then it went down again 5 minutes later and had to call them back. They did a restore to midnight the previous night and it seems to have stuck.

      So what was up with that code? I hope that wasn't some prank.
      {{ DiscussionBoard.errors[8639777].message }}
      • Profile picture of the author DailyIncome
        Mate, its

        <?php remove_filter ('the_content', 'wpautop'); ?>

        NOT

        ?php remove_filter ('the_content', 'wpautop'); ?

        You need the <?php in front and ;?> in the back.

        BTW, normally your functions php already starts with <?php therefore:

        just add:

        remove_filter ('the_content', 'wpautop');
        {{ DiscussionBoard.errors[8648846].message }}
        • Profile picture of the author DailyIncome
          BTW, normally your functions php already starts with <?php and ends with ?>
          therefore:

          remove_filter ('the_content', 'wpautop');


          or just be lazy and add:

          <?php remove_filter ('the_content', 'wpautop'); ?>

          all the way to the bottom of the code.

          hope that helps...
          {{ DiscussionBoard.errors[8648851].message }}
          • Profile picture of the author huskieswin
            Sorry, I did do that but when I tried to include it in my reply here, it wouldn't let me...

            I did not know where to put it though and don't know if I put it all the way at the bottom. Too scared to try that again!
            {{ DiscussionBoard.errors[8648969].message }}
            • Profile picture of the author DailyIncome
              i believe there is a free wp remove auto p plugin out there... have a look on google. cheers
              {{ DiscussionBoard.errors[8649029].message }}
              • Profile picture of the author swriviera
                Yep there is a free plugin called: Toggle wpautop that allows you to turn the filter on or off per post.
                I installed it.
                I activated it.
                I took out the extra <p> and </p> 's that the editor had added.
                I saved it.

                And VOILA!!!! the <p> and </p> 's got put right back in where they were before.

                This filter did not work so well for me.

                Any other suggestions????


                Sandra

                P.S. Is there a premium editor out there that just does it right???
                {{ DiscussionBoard.errors[8675926].message }}

Trending Topics