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
-
Swapping Homepages in WordPress
Hi, Th situation is: I've cloned my homepage & added new content to the cloned page I've then updated the WordPress settings to make the cloned page the new homepage Will I lose PA as the new cloned page is in effect a new article?
Technical SEO | | jasongmcmahon0 -
Big SEO Changes
Firstly, this is quite extensive so thank you to anyone who answers some or all of the below! So this is quite a lengthy ordeal, and I'm going to start by saying that I'm no SEO expert (yet). I've paid for SEO for years and only on the odd occasion has it made any real difference. It has come to the point now where I've spent so much money on SEO over the years with practically no benefit that I can't afford to do it anymore, so I am teaching myself. So, back in July my website was hacked for a total sum of three weeks. My SEO/Hosting company at the time didn't do anything about it, let the hack sit there and didn't even take the site offline. It just so happened that at the time I was changing over to a new site at the time anyway, so I launched the new site (completely different in structure to the old one), did all of the relevant 301 redirects, and my traffic hasn't recovered since. I have gone from around 100-150 daily visits to 0-10. The descriptions, keywords, alt image tags, h1 & 2, meta data, etc. is all much better (a lot of it was empty on the previous site) on the new site than it was on the previous site so I was assuming it would be better, but it isn't. Anyone got any suggestions as to why this might be? Here are some specific questions: Canonical Problem? My site is ecommerce and lists some products in several categories, that has resulted in a high duplicate content rate. Is it expected/accepted by google that this would be the case for an ecommerce website or do I need to sort out some serious canonical urls to fix the issue? The site structure of my website could also be a problem, but I'm not qualified enough to know for sure. If you view a product/sub-category, then remove the category section of that link, the product will still appear. I don't know if this structure is good or not? i.e. if you click both links below, the link will appear all the same. http://thespacecollective.com/space-clothing/nasa-and-space-t-shirts http://thespacecollective.com/nasa-and-space-t-shirts Is this a problem for SEO? Duplicate Product Tag Problem? I have many duplicate product tags appearing on many products, should these be blocked in the robots.txt? i.e. http://thespacecollective.com/space-memorabilia/space-flown/apollo-11-flown-cm-meteorite-acrylic http://thespacecollective.com/space-memorabilia/space-flown/apollo-11-flown Site Code Structure When choosing the template I would use for my website I did not stop to consider if the code was SEO friendly, this on my part was due to my ignorance on the subject. Is the site structure SEO-friendly or is it hindering my efforts? Website: http://thespacecollective.com Again, thank you to anyone who takes the time to read/care about the issues facing a newbie. My only option now is to learn SEO myself (which is well overdue), so any advice/answers are appreciated!
Technical SEO | | moon-boots0 -
Recommendation for SEO plugin for Wordpress
Dear Moz Community, Could I pick your brains on SEO plugins for WordPress? Our web developer has installed an SEO plugin called Yoast, and I am not quite sure of it's efficiency. The problem we have at the moment is that the Page Title is not updating on Google the way we anticipated. To solve this issue we unchecked forced rewrite under the title options, but this had no effect. For instance our name on Google appears as Man Van London all the time, despite any amendments we make it always has Man Van London at the start of the title. ( website: www.manvanlondon.co.uk) If Yoast is the best SEO plugin for wordpress, is there any solution to fix this issue? Or is anyone familiar with another plugin? Does anyone suggest to not use plugin's at all? Thank you for your time. Looking forward to your wisdom. Monica
Technical SEO | | monicapopa0 -
SEO Optimized Video Gallery
I want create a video gallery in my site. Does anyone know about any video CMS or wordpress video plugin optimized for SEO?
Technical SEO | | Felip30 -
Wordpress and Redirects?
I want to update my permalinks - actually I want to change the URL's to fit the content and keywords better. I can choose "edit" the URL, but don't I need a redirect? I don't see any htaccess Plugin installed.......is that what I need to be able to change my URL's in Wordpress?
Technical SEO | | cschwartzel0 -
SEO friendldy Site structure?
we are in the process or rewriting all the pages on one of our sites and will be changing some urls around. i was just wondering if dashes or underscores are better in the urls SEO wise? www.site.com/word-word-word/ or
Technical SEO | | 858-SEO
www.site.com/word_word_word/ i personally like the underscores better but some colleagues tell me that dashes are better, any tests out there on this issue?? Thanks0 -
Significance of Page speed to SEO?
I am in the middle of optimizing sites for SEO, and am wondering how big of a factor it is to get page load speed under 1.5 seconds? I am prioritizing tasks and I want to know how much this could affect trafiic? Thanks
Technical SEO | | Zachary_Russell1 -
Does Bitly hurt your SEO?
I often use bit.ly or Google URL shortener in links when other websites post my articles so I can track clicks. However, I am thinking this may HURT my SEO given that it is taking away a back link to my website. Is that logic correct ? If so, what is a good way to be able to track clicks if a website posts your article without jeopardizing the SEO value?
Technical SEO | | StreetwiseReports1