Should WordPress themes be hard coded for better SEO?
-
In the interests of making my site faster I have recently come across the suggestion of removing unwanted PHP from my WooThemes WordPress theme. The suggestion is to hard code the choices I have made in the WordPress template to reduce on database calls.
Has anyone actually done this to their WordPress theme before and seen any measurable results?
-
Hey Ben,
Thanks. Am using a Wootheme called Simplicity. I have just left the minify box unchecked in W3 Total Cache since this was causing the problem. The site speed seems to be ok though even with this disabled.
-
Hi Sofia,
Not a problem, glad I can offer my assistance.
What slider are you using? I might be able to solve that problem for you, I know I had to fiddle with the code of my theme a little to make total cache behave but they were minor changes.
-
Ben, thanks for the useful follow up. I will certainly check out spitecow. Have found W3 total cache speeds up my site quite a bit, only problem is its breaks the image slider for some reason so have some looking into to do.
-
To help measure results one way or another you could use http://loads.in to test how long it takes your page to load from different geographical locations. I think Chrome's developer tools has a similar thing as well.
If you're trying to speed up your site then I would recommend grouping images (icons etc) into an image sprite and use css background positioning to show the respective image. I found that implementing this into a theme resulted in great speed increases as you make a single HTTP request for a single image, as opposed to loading up several images on page load.
If you're not savvy enough with css image sprites I would recommend using www.spritecow.com to produce the correct background-positions for the images so you can add them into your css file.
-
I have used WooThemes in the past and personally I think some of their code and their modifications are a bit overkill, sure it makes things easier for users but its not really following the way WordPress does things (Creating folders in WP-Content to put file uploads from their admin panel for example).
In general terms I think its better to hard code references to public resources (CSS Links, JavaScript links etc in header.php). For better speed increases I would suggest having links to JQuery or MooTools in header.php and any other JavaScript files should be put in footer.php just above the closing body tag.
The benefit to this is that the core JavaScript framework (JQuery or MooTools) is loaded first, the page can then render on the screen whilst the last few JS files are downloaded and put to use.
It maty be worth using WP SuperCache or similar to cache your pages and allow browser gzip compression for quicker page loading.
I think WordPress in general makes too many database calls anyway, so where possible I think its acceptable to hard code links.
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
Browse Questions
Explore more categories
-
Moz Tools
Chat with the community about the Moz tools.
-
SEO Tactics
Discuss the SEO process with fellow marketers
-
Community
Discuss industry events, jobs, and news!
-
Digital Marketing
Chat about tactics outside of SEO
-
Research & Trends
Dive into research and trends in the search industry.
-
Support
Connect on product support and feature requests.
Related Questions
-
Which URL is better?
Hi everyone, Could you please help me with picking out the right URL for my company's website? We are MoonCreate and we make beautiful clothes. Unfortunately, the domain mooncreate.com is not available and I have to choose between mooncreatebrand.com or mooncreatewear.com Which one is better, in your opinion? Look forward to receive your suggestions! Thank you! 🙂
Technical SEO | | kirupa0 -
Uninstalled WordPress, now getting 200 errors of 500 response code
Hello there, A little while ago I installed WordPress on the server I use with Bluehost to try out a theme. My business domain name is also the primary account on this server. WordPress was causing some serious issues on the server so I uninstalled it, and now I have over 200 "500 response code" errors according to WebMaster tools. I've included a screenshot of some of them. Could anyone advise me on what to do about this? Thanks so much! MYbW6
Technical SEO | | lulu710 -
Wordpress log attempt spam?
i have used wordfence on wordpress and I am getting a lot of alerts of "people" registering on my blog but then having over 20 failed login attempts. Gives the IP addresses. Anyone else had this issue and should I just block the ip addresses? How have you guys fixed the issues?
Technical SEO | | kpexpressions0 -
Schema Wordpress plugins
Hi Can anyone recommend a good Schema plugin for wordpress sites, does anyone know if Yoast SEO plugin has schema features ? Cheers Dan
Technical SEO | | Dan-Lawrence0 -
What is the best practice to seperate different locations and languages in an URL? At the moment the URL is www.abc.com/ch/de. Is there a better way to structure the URL from an SEO perspective?
I am looking for a solution for using a new URL structure without using www.abc.com**/ch/de** in the URL to deliver the right languages in specific countries where more than one language are spoken commonly. I am looking forward to your ideas!
Technical SEO | | eviom0 -
I noticed all my SEOed sites are getting attacked constantly by viruses. I do wordpress sites. Does anyone have a good recommendation to protect my clients sites? thanks
We have tried all different kinds of security plugins but none seem to work long term.
Technical SEO | | Carla_Dawson0 -
SEO Audit - Panda
I am looking for a reputable SEO company to help diagnose Panda issues. I am very familiar with SEO and lead an in-house team so I need more than a basic audit. e.g You need unique content
Technical SEO | | WEB-IRS
e.g. You need to create quality content I am looking for someone with a technical mind to help diagnose. Please reach if you have someone in mind.0 -
What is the best website structure for SEO?
I've been on SEOmoz for about 1 month now and everyone says that depending on the type of business you should build up your website structure for SEO as 1st step. I have a new client click here ( www version doesn't work)... some bugs we are fixing it now. We are almost finished with the design & layout. 2nd question have been running though my head. 1. What would the best url category for the shop be /products/ - current url cat ex: /products/door-handles.html 2. What would you use for the main menu as section for getting the most out of SEO. Personally i am thinking of making 2-3 main categories on the left a section where i can add content to it (3-4 paragraphs... images maybe a video).So the main page focuses on the domain name more and the rest of the sections would focus on specific keywords, this why I avoid cannibalization. Main keyword target is "door handles" Any suggestions would be appreciated.
Technical SEO | | mosaicpro0