Improve company productivity with a Business Account.Sign Up

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1635
  • Last Modified:

How to customize WordPress with HTML, CSS, Javascript, PHP, etc.

I have been developing websites with HTML, CSS, Javascript, PHP, etc. for many years and consider myself competent with them.

Recently, I have setup several WordPress websites for clients using purchased themes. I have mostly just used the tools that come with the themes, such as the included shortcodes, styles, etc.

Because so many clients are calling for WordPress, I need to get up-to-speed on how to customize these sites. The end result is always just HTML, CSS and Javascript (it is my understanding), so anything doable with code *should* be doable with WordPress, correct? Here are a few examples of the types of things I would like to learn:

(1) A task that normally I would accomplish using PHP and a database, how to do the same in WordPress? Such as taking a user input, doing a database lookup, and displaying results on a page.

(2) I want to do a completely customized page design. Should I start with an existing theme (basic theme, purchased theme, "naked" theme?) and build from there, or must I develop my own theme from scratch?

(3) I like the fact that many themes are already responsive (desktop, tablet, smartphone, etc.), how can I leverage that but still do my own completely custom design/layout?

(4) I want to start with an existing theme but do a lot of custom CSS.

(5) I want to add my own Javascript to an existing WordPress site.

I am hoping someone with experience doing these kind of things can steer me in the right direction. I don't want to hack a WordPress site to pieces, I want to use best practices.

Must I look into theme development? Developing my own plug-ins? Creating my own shortcodes? In which cases is it OK to override an existing theme's code (CSS, Javascript, etc.) being aware that a theme upgrade could cause problems later? Is that even a best practice?

Coming from developing in pure code, it is difficult for me to get used to all the menus and options. So that has been a bit of a challenge. I guess I basically need to understand how WordPress works, how to customize it, etc., beyond just being a point-and-click, drag-and-drop WordPress developer.

It also seems like for accomplishing any task, the go-to solution is always to look for an existing plug-in before doing any programming. But there must be cases where writing your own code is the better way to go.

I am not looking for specific instruction on how to do the above items necessarily, but perhaps articles, online tutorials, a book, etc., for someone who is in my position? There must be others like me out there.

Thank you!
Brad Bansner
Brad Bansner
  • 2
1 Solution
Tom BeckCommented:
About six months ago I was were you are now with regards to Wordpress so I'm still just a beginner. I've learned a lot in that time and am confident that I can customize a Wordpress site to any degree I choose AND not worry about it all falling apart on the next upgrade of the WP core. I'm even writing my own plugins. I've also taken plugins that are close to what I want and modified them to suite my needs.

(1). You could do all of your PHP coding for database access the same way you've always done it and it would work in WP (such as using mysqli queries, fetch_assoc, etc.). But WP has so many useful functions that shortcut the process. Look here.. Use custom page templates and code however you like (see below).

(2) (3) (4). Start with an existing theme that has the responsive features you like and create a child theme from it. Then, if the original theme is updated, your modifications are safe. Look here.

(5). There are several ways to inject javascript code on the page. Look at the add_action and add_filter functions but generally get a thorough understanding of the concept of "hooks" in WP. Lots of links like this one on the web.

Also look into creating custom page templates. By using this technique, you can completely isolate your customizations from the WP core. Any upgrade to the core and you're safe. With custom page templates you have complete control over how the content for your pages is displayed and where it's coming from in the database while the theme and core files manage the shell (wrapper containers, menus, banners, etc).

Just finishing up a WP site now and really the only things "WP" about it are the authentication functionality and Dashboard interface (which I have also modified to my liking). I've removed the sidebars, comments, and the whole "blog" centric aspect of WP. I did not want a "blog" site.
Brad BansnerWeb DeveloperAuthor Commented:
Thanks man, this is exactly the kind of intro I needed. Hopefully in six months or less I'll be banging out custom WP sites like you. Cheers!
Tom BeckCommented:
Awesome, thanks both.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now