• I’m trying to add a new page to my site and I’m using the HTML tab with code I have tested out on THIS very helpful Code site:
    https://www.w3schools.com

    The header tags are working fine, but the line breaks are not.

    I always use Notepad so there isn’t a Word formatting issue. But does WP have formatting issues of its own? I notice HTML in the widgets didn’t always behave either.

    I want an adequate gap between H1 and H2 at the top and between the previous paragraph and the H2; Disclaimer, but no matter how many line breaks </br> I’m inserting, it is having no effect and my Privacy page is looking unprofessional:

    https://getloadsmorecustomers.co.uk/privacy/

    Anyone know how I can get these line breaks to work?

    Thanks

    Forgot to select that I’m using the latest version of WP

Viewing 15 replies - 1 through 15 (of 15 total)
  • this has been discussed ad nauseum.

    stop using br tags, and style your paragraphs properly.

    just adding a line-height to your p selector improves that page significantly.

    p{
    	padding: 5px 0;
            line-height: 1.5em; <---
    }

    use margin and padding for h1 and h2 and p in the style sheet to format the gaps. your empty paragraphs and line breaks are only confusing.

    @whooami – just my words ??

    Thread Starter rustybulb

    (@rustybulb)

    Thanks for your replies.

    p{
    	padding: 5px 0;
            line-height: 1.5em; <---
    }

    Where do I use this code? I have already messed up this site through messing with code I didn’t understand resulting in taking the site down entirely and even changing hosting!

    It doesn’t look like it goes in the page post.

    Please tell me which code and exactly which line.

    Thanks

    what I provided goes in your theme’s stylesheet.

    its called CSS and its discussed on that very helpful site: ??

    https://www.w3schools.com/

    Use a plain text editor, and LOOK for what is not in front of the arrow. A simple search for p{ will locate it.

    Thread Starter rustybulb

    (@rustybulb)

    Thank you.

    You’re right – I should learn this stuff for myself. I was being over cautious because I already messed the site up once.

    it looks like this, right now:

    p{
    	padding: 5px 0;
    }
    p.white {
    	color: #fff;
    }
    #blogDescription {
    	color: #fed207;
    }
    #rss { ......

    you want to add that line-height bit under the padding bit.

    I already messed the site up once.

    thats what backups are for. you DO backup stuff before you make changes, right?

    Thread Starter rustybulb

    (@rustybulb)

    Thanks, yes I found the right code – just about to change it.

    "thats what backups are for. you DO backup stuff
    before you make changes, right?"

    I backed up the original code but not the site. Whenever I mess up code, putting the original code has always sorted it out, but it didn’t work last time.

    My host only backs up sites every Sunday night, so in today’s case I’d have to wait til Monday before making any changes.

    Thread Starter rustybulb

    (@rustybulb)

    OK I changed:

    p{
    	padding: 5px 0;
    }

    to:

    p{
    	padding: 5px 0;
            line-height: 1.5em; <---
    }

    but it hasn’t made the difference I wanted. It only increased the gap between the top sub-heading and the first paragraph.

    Did I do it wrong?

    I chose WP so I could just add content without thinking about code too much.

    The only reason I used code in this case was because I wanted large headings and the wysiwyg tab didn’t give that option.

    Remove the arrow, like this:

    p {
    	padding: 5px 0;
            line-height: 1.5em;
    }

    WordPress is great for publishing content without needing to know HTML and CSS, but you can’t do web design without learning it.

    btw, either <br> or <br /> but not </br> but you should not use this tag in wp as others already mentioned ??

    Read the lessons on CSS and xHTML at https://www.w3schools.com (the site you referenced).

    Note that you can duplicate a default theme folder (start with all new files locally) and name it something new and modify the comment on the style sheet (to reference your info, not the default theme info). It’s very important that this information be unique as you cannot have duplicate themes. Upload that folder and use your admin to select that theme for display.

    Then mess around with the files in THAT theme folder, confident you have a fresh backup of untouched files. Note that all of this assumes you have FTP access to your site.

    Then, I’d go into my user profile and TURN OFF the wsiwyg editor option… just an opinion, but you won’t learn anything from letting some code do the work for you.

    Finally, when you DO understand and are having success with your post formatting and template file editing, you can think about what tools you really need for post/page formatting and make your own by editing the /wp-includes/js/quicktags.js file…

    Note that modifying core files is frowned on here… but this is one place I make an exception because none of the plugins that claim to do this are very good. I just know that when I back up my site files for upgrade to keep a copy of that file… I prefer conscious formatting of posts/pages content — headings, paragraphs, lists, etc — through the quicktags.js file, you can edit how the existing tools work (for example, the existing list buttons indent and add new lines and other crazy stuff that I simply remove via the quicktags.js file).

    Again, I want to encourage you to experiement inside a UNIQUE theme folder and starting with a copy of the default is the best way to do that (or classic)… NOT with some third party theme. ALSO, be careful and don’t mess around with the core files until you REALLY understand what you are doing with CSS, xhtml, jquery/js and PHP.

    Good luck with it!

    if using windows, the better way is install wamp package, install wordpress, then play around w/ it until satisfy, and with this way, you don’t mess your live website

    to download wamp, get it here
    https://downloads.jlbn.net/

    to setup wamp, follow this
    https://blog.jlbn.net/?p=3

    to setup wordpress on wamp, follow this
    https://blog.jlbn.net/?p=34

    Have fun ??

    Well, that’s true, though if a person has a problem understanding the basics of WordPress, they *might* not be up to installing an server on their computer either…. and you cannot get feedback and/or troubleshooting for a site on YOUR computer as opposed to publicly hosted.

    Note You can set up a sub-domain at your site and install WordPress there, avoiding your actual site if you have one. Moving an install from a sub-domain to a live site isn’t that hard.

    yes and no

    when look at those guides, if you’re an experience coders, you *might* feel a little overwhelm w/ pages just to show 1 simple task of installing wordpress; however, if you’re a novice programmer or especially non-coders, you would appreciate very-simple-step-by-step-with-screenshot tutors as these guides aim to help those wampserver beginners ??

    btw, if you’re stuck, you can get help from wampserver forums; in additions, it’s a big benefit to play, I meant setup, wordpress and/or any other php scripts such as joomla, drupal, phpbb, mediawiki…, and have them all run at the same time, the way you want before actually upload to live host. Moreover, you can test to compare standalone wordpress with wordpress as add-on to joomla and/or drupal… to see which approach is better…

    I mean too many things you can play with, and from there you can set it up on live host, or if it’s out of your permission, at least you know what to request your live host to setup for you

    anyway, I think I might just go too far from the original error that you concern, so it’s your choice ??

    Thread Starter rustybulb

    (@rustybulb)

    Thanks for your comprehensive posts koolvn and syncbox – Great suggestions.

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘How Come Code Doesn’t Work Properly in WP?’ is closed to new replies.