WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Why the large amount of white space? (18 posts)

  1. steelerdirtfreak
    Member
    Posted 8 years ago #

    On a page I'm working on - http://truth4life.org/schedule-and-location/ - I put a form at the bottom so visitors can get directions.

    When I put it in, and when I go to edit it, there are no line breaks. However, if I highlight the area from the end of the text to the beginning of the form, and check the selection source, it appears that somehow 13 linebreaks have been added in.

    What would be causing this, and how might I fix it?

  2. TechGnome
    Moderator
    Posted 8 years ago #

    I looked at the source, and there aren't any line preaks in there.... it's really odd..... I even looked throug the CSS and couldn't find anything in there either.

    Buuuut.... your menu is broken... there's an opening li tag jsut before Meta.... but I don't see the corresponding close li tag...

    Going through this may help too:
    http://validator.w3.org/check?verbose=1&uri=http://truth4life.org/schedule-and-location/

    FYI: Before you freak, that very first error causes the next 5 or so... it's because the first script tag needs to move into the head section, and the first link rel tag needs its terminating /> on the end. Then revalidate it and see how many of the errors clean up.

    You've also go a few areas where you have h tags inside of p tags, which isn't allowed (under W3C guidelines). Some of it seems trivial and you may or may not be interested in being w3c compliant, but sometimes, that's the root of the problem.

    -tg

  3. steelerdirtfreak
    Member
    Posted 8 years ago #

    I've about given up on trying to validate anything with WP. For some reason, it seems that WP radomly mangles the code, rendering what was valid in an invalid manner. For instance, the missing close li tag is indeed in sidebar.php, but when WP renders the page, it is gone. Or the script is located in the header, but WP renders it in the body; the h tags are not in paragraphs on the original, it is only when rendered by WP that they are placed inside of a paragraph.

    I can't figure out how to force WP to leave the code alone, so I quit worrying about validation. Not good practice, I know, but I don't know what else to do.

    As far as the line breaks, if I do just a view page source, they don't show up, BUT, if I use the Firefox Web-Developer toolbar, and highlight just that section, they do show up.

  4. steelerdirtfreak
    Member
    Posted 8 years ago #

    Since this came up, is there any way to stop WP from arbitrarily wrapping p tags around any other tags?

    It seems to happen to h tags, div tags, form tags, and probably others.

  5. steelerdirtfreak
    Member
    Posted 8 years ago #

    Or, is there a way edit our static pages outside of the WP editor? In other words, is it possible to use a text editor that doesn't add in arbitrary code?

  6. Beel
    Member
    Posted 8 years ago #

    Being that it is written in PHP code, WP does not "arbitrarily" do anything. There is a way to suspend autop, is the ability to search back up?...

    yep... evidently you may do it manually, use this plugin or there is another plugin to do it on a post-by-post basis.

  7. steelerdirtfreak
    Member
    Posted 8 years ago #

    Ok, I don't have a clue what a wpautop is, so I certainly would have had no way of knowing to search for it.

    In any case, I installed this plugin, and now everything has TWO p tags wrapped around it. Now I didn't code it that way, so by definition, it was 'arbitrarily' inserted.

    I'm sorry I don't have all of the technical vocababulary that some seem to like to flaunt, but then again, if I did, I probably wouldn't need to be on here, asking for help. Thankfully there are some who are willing to help and for that I am appreciative.

  8. oriecat
    Member
    Posted 8 years ago #

    The autop thing is that if you type a paragraph into the WP write post screen, it will format and display it as a paragraph. Thus the p tags. If you turn that off, then you will have to manually insert the code yourself. Some people like to do that. If you don't want to do that, then you should turn that plug in back off. I don't know why it would insert double p tags, that seems really odd.

  9. oriecat
    Member
    Posted 8 years ago #

    And, as TG and Beel were saying, it might be best to get the site valid, that would help a lot in figuring out the issues. WP doesn't just add or drop code for no reason, something somewhere must be telling it to. We can help you work through the errors if you need it.

  10. TechGnome
    Moderator
    Posted 8 years ago #

    If I were a betting gnome, I'd be willing to bet that if you changed the theme to Classic or the KubrikDefault, it'll come out right. I wonder if you've gotten a hold of a bad template or something.

    -tg

  11. steelerdirtfreak
    Member
    Posted 8 years ago #

    I guess I'm going to have to accept that, for whatever reason, WP is not going to validate for me.

    I just tried switching to the default template and the errors rose to 74; almost all of them were related to multiple p tags.

    Besides which, the church governing board absolutely abhors the look of the default theme for a church web site.

    Switching back to the theme they have chosen, this page now comes up with 57 errors, again, nearly all of them are caused by these phantom p tags. What is even more confusing is that I am not using any p tags of my own, I supposedly have this wpautop thing turned off, and I'm still getting 2 and sometimes 3 p tags wrapped around each line on the page.

    Does it matter that this is a static page and not a post? Is there some other sort of widget that would control formating for pages?

  12. moshu
    Member
    Posted 8 years ago #

    I don't understand the double p tags at the beginning of the post, but I seem to understand a lot of p tags that come later: if you put the li tags on their own line with blank lines in between - WP does add p tags. Hitting the Enter twice = new paragpraph.

  13. oriecat
    Member
    Posted 8 years ago #

    Could there maybe be p tags in your actual template?

  14. Beel
    Member
    Posted 8 years ago #

    Doubt if it is in the template and no one is saying you need to stick with the default or classic theme. We are suggesting a "nonarbitrary" means by which to figure out the problem (and WP uses code which is a set of instructions applied consistently and not by chance so "by definition" it is not arbitrary).

    Switch to the unedited classic theme or the default theme and turn off all plugins. It should validate fine. Perhaps you have a plugin that is causing the problem. Once you track down the problem you then can work your way back to the theme you have chosen.

    I use WP for 2 church sites and they validate fine - well they did until one of my plugins causes an errant p tag in another plugin which allows for php in posts.

    http://www.stjohnsboulder.org
    http://www.stpetersparish.org

  15. steelerdirtfreak
    Member
    Posted 8 years ago #

    I admit that I am in over my head in trying to understand anything about php, so here is a link to a text file that I just uploaded that is the page template I am using:
    http://www.steelerdirtfreak.com/page-php.txt

    Perhaps something is wrong with that?

    moshu - thanks for the heads up on the extra lines with the li; I didn't catch that as that is the way the quick tag editor set them up.

  16. moshu
    Member
    Posted 8 years ago #

    that is the way the quick tag editor set them up

    Then there is something wrong with your install because my quicktags give me perfectly valid and indented (!) list code.

  17. steelerdirtfreak
    Member
    Posted 8 years ago #

    Thank you Beel! I started turning off plugins and quickly discovered that this theme came with something called Textile 1 and Markdown both turned on. I turned these two off and the errors dropped down to 12, and several of them are due to the way Mapquest has their form set up, so I'll not worry too much about them. The rest I think I'll be able to find and correct fairly easy.

    AND....the form is now up where it belongs!

    So again, thank you!

    And I used the contact form on your site, but not sure if it worked, so I also wanted to apologize for my snippy response earlier. Fighting with this had gotten on my last nerve, and I replied with that nerve instead of listening to the 'boss' and walking away for an hour or so. So anyhow, sorry about the snippiness.

  18. Beel
    Member
    Posted 8 years ago #

    No worries, after years of C.P. and counseling teens in jail/prison, "stuff" doesn't stick - and nobody throws it better. I stuck with my position because knowing it isn't arbitrary means there is a way out if you just keep pluggin', or in your case, unpluggin' away.

    The 2 plugins you mentioned are the only two files I delete before uploading new releases of WP. It may be solely ignorance on my part, but I don't see any value in either and activating them has always caused problems for me. Because I don't need or use them, I have never bothered to look into why they give me headaches. Dad (a pediatrician) taught me early: "Dad, it hurts when I bend my arm like this." "Well, don't bend your arm like that."

Topic Closed

This topic has been closed to new replies.

About this Topic