Solved

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

Posted on 2014-04-01
4
1,579 Views
Last Modified: 2014-04-02
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!
0
Comment
Question by:bbdesign
  • 2
4 Comments
 
LVL 38

Accepted Solution

by:
Tom Beck earned 500 total points
ID: 39970574
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.
0
 

Author Comment

by:bbdesign
ID: 39971012
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!
0
 
LVL 38

Expert Comment

by:Tom Beck
ID: 39971962
Awesome, thanks both.
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

WordPress has made it easy to create scalable sites based on their powerful CMS, but as great as WordPress is, there are some SEO issues that haven’t been addressed out of the box.  Fortunately these problems can be solved with a few plugins.  The f…
Transferring a wordpress site from a host or local dev server to another host can be a pain. So I've included my steps on how I have accomplished this task. Steps include an assumption that you have Cpanel access or Ftp access.. If you do not hav…
This video teaches users how to migrate an existing Wordpress website to a new domain.
The purpose of this video is to demonstrate how to exclude a particular blog category from the main blog page. This is can be used when a category already has its own tab, or you simply want certain types of posts not to show up on the main blog. …

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now