Wordpress crash course for developers?

Associate
Joined
10 Jan 2006
Posts
483
I am a junior developer and have been given a wordpress job to do. I am perfeclty capable on standard CSS html however wordpress is driving me mad as I cant seem to control what I want to - fo rexample my blog post wont center with width:100% , margin 0 auto. Is there a crash course which will help me understand how this platform works?
 
Associate
Joined
26 Sep 2007
Posts
1,252
Location
Amsterdam
I am a junior developer and have been given a wordpress job to do. I am perfeclty capable on standard CSS html however wordpress is driving me mad as I cant seem to control what I want to - fo rexample my blog post wont center with width:100% , margin 0 auto. Is there a crash course which will help me understand how this platform works?
For front end it's no different to your regular markup and stylesheets with some added PHP tags. If your styles are being overridden use the chrome developer tools to find the stylesheet it is being inherited from. Your markup and stylesheets are stored in templates at wordpressroot/themes/themename. Markup also lies in your pages and posts (but avoid using the visual editor as WordPress automatically applies paragraphs and line breaks if you don't disable them);

In regards to your problem with your blog post not centering - is it display:block? margin: auto won't work without it.
 
Associate
Joined
21 May 2013
Posts
1,973
Unless you have some kind of containing element with a specified width then setting width: 100% will make it the width of the viewport anyway. I think the issue is more likely to be with CSS than Wordpress or PHP though.

Can you isolate an example that shows your problem?
 
Soldato
Joined
2 May 2004
Posts
19,946
I am a junior developer and have been given a wordpress job to do. I am perfeclty capable on standard CSS html however wordpress is driving me mad as I cant seem to control what I want to - fo rexample my blog post wont center with width:100% , margin 0 auto. Is there a crash course which will help me understand how this platform works?

It's quite straight forward. Either make a child theme, which is useful if you're just modifying an existing theme or just make a new theme which is almost as easy. As mentioned above, it's the same as any old CSS markup.

I've always found the WordPress Codex very good: https://codex.wordpress.org/Child_Themes.

If you're a junior developer then I'd expect you know everything you need to know to make a WP (child/full) theme, so just get stuck in with the Codex! :)

I'd recommend you start by making a child theme off the main theme, or off a theme that looks similar-ish to what you want. Then when you get the hang of that, it'll be easy to make your own theme from scratch if you want.
 
Last edited:
Back
Top Bottom