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
-
Wordpress Page vs. Posts
My campaigns are telling me I have some duplicate content. I know the reason but not sure how to correct it. Example site here: Bikers Blog is a "static page" referencing each actual "blog post" I write. This site is somewhat orphaned and about to be reconstituted. I have a number of other sites with a similar problem. I'm not sure how to structure the "page" so it only shows a summary of the blog post on the page not the whole post. Permalinks is set as "/%postname%/" I've posted on Wordpress.org with no answer. Since this is an SEO issue I thought maybe someone with WP experience could chime in. Thanks, Don
Technical SEO | | NicheGuy0 -
SEO for User Authenticated Content
Hi Everyone - I have a potential client who is seeking SEO for a site that contains about 95% of content only accessible through user authentication . Does anyone have tips for getting this indexed without having to open it up to the public? I was considering adding "snippets" into the robots.txt or creating an additional page with snippets linking to the login page. I'd appreciate any thoughts! Thanks!
Technical SEO | | manutx0 -
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 for Wordpress
I am sure you have been asked this many times... What is the BEST Wordpress Plug-in for SEO - Easy to Title Page, Meta Tags, etc... ?? Thanks
Technical SEO | | tab540 -
What are the SEO implications of URLs that use a # in them?
I have several clients who have begun to ask questions about sites that are designed to look like a single page. When you click on a link, the URL changes but it uses a # before (i.e. http://www.kelloggs.com/teamusa**/#**/teamusa/athletes/kerri-walsh.html. What are the SEO implications of having a page set up this way? I noticed that Google has indexed this page but the indexed URL does not include a #. Is Google indexing a separate version of this page? Any insights would be really helpful! Thanks
Technical SEO | | VMLYRDiscoverability0 -
Where does Wordpress store the 301 redirects?
Hi, I've just created a campaign for my new wordpress blog and found 11 301 redirects which I was not aware of. It looks like wordpress has created them automatically. Does any one know how wordpress handles this issues or where are they stored so I can delete them? They are of no use for me. 9 of these redirects point to the same url with an added '/' and are in pages 1 is on a post. I've been changing the permalink and some urls several times and maybe one of these times the Wordpress has automatically created the 301 redirect. But why? I do not want to keep the old url. the last redirect is very strange it goes from http://www.mydomain.com/folder to http://www.mydomain.com where folder is the folder where I installed wordpress. But again, I want no one to type the url with the folder name or even know this folder exists. Any comment on this would be greatly appreciated. Thanks a lot, David
Technical SEO | | dballari0 -
Rel canonical = can it hurt your SEO
I have a site that has been developed to default to the non-www version. However each page has a rel canonical to the non-www version too. Could having this in place on all pages hurt the site in terms of search engines? thanks Steve
Technical SEO | | stevecounsell0 -
When to SEO optimize a blog post?
Hi there, Here's our situation: there are two people working on the blog. person 1) writes the posts person 2) SEO optimizes the posts I know this is not ideal but it's the best we can do and it's a whole lot better than no blog. 🙂 I'm the fellow optimizing the posts. I've found that my best SEO efforts usually slightly undermine the readability of these posts -- not in an extreme way, I'm not going overboard with keywords or anything. Rather, things like a sexy & enticing article heading may have to be dummed down for search engines... Because of this dumming down, I like to wait a couple of weeks to SEO optimize our posts, the logic being that we get the best of both worlds: a happy regular readership on topic articles that are clearly described for (and aligned to the terms used by) our search engine visitors What I'm wondering is, Generally: can you see any problems with this setup? would you do it differently? Specifically: does Google (et al) punish this sort of backwards re-writing? and, does it somehow amount to less SEO mojo when done retroactively? Thanks so much for your time! Best, Jon
Technical SEO | | JonAmar0