Moz Q&A is closed.
After more than 13 years, and tens of thousands of questions, Moz Q&A closed on 12th December 2024. Whilst we’re not completely removing the content - many posts will still be possible to view - we have locked both new posts and new replies. More details here.
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
-
Google Not Indexing Pages (Wordpress)
Hello, recently I started noticing that google is not indexing our new pages or our new blog posts. We are simply getting a "Discovered - Currently Not Indexed" message on all new pages. When I click "Request Indexing" is takes a few days, but eventually it does get indexed and is on Google. This is very strange, as our website has been around since the late 90's and the quality of the new content is neither duplicate nor "low quality". We started noticing this happening around February. We also do not have many pages - maybe 500 maximum? I have looked at all the obvious answers (allowing for indexing, etc.), but just can't seem to pinpoint a reason why. Has anyone had this happen recently? It is getting very annoying having to manually go in and request indexing for every page and makes me think there may be some underlying issues with the website that should be fixed.
Technical SEO | | Hasanovic1 -
Express js and SEO?
Hi fellow Mozzers, I have been tasked with providing some SEO recommendations for a website that is to be built using express.js and Angular. I wondered whether anyone has had any experience in such a framework? On checking a website built in this and viewing as a GoogleBot etc using the following tools it appears as though most of the content is invisible: http://www.webconfs.com/search-engine-spider-simulator.php http://www.browseo.net/ Obviously this is a huge issue and wonder if there are any workarounds, or reccomendations to assist (even if means moving away from this - would love to hear about it)
Technical SEO | | musthavemarketing2 -
Should we remove category paths for better SEO?
We're looking to build some serious content and capitalise on long-tail keyword traffic for our sub-category pages, example for targeted keyword "designer dining tables". Example of current link: www.website.com/designer-furniture/designer-dining-tables.html Would removing the category paths help? Example result - www.website.com/designer-dining-tables More user friendly URLs and better for SEO would you suggest? The only problem is, if we removed the paths would this have a hit on our traffic? Any advice would be much appreciated. We are using Magento platform.
Technical SEO | | Jseddon920 -
Authorship and Publisher on WordPress
I successfully enabled rel=publisher on our WordPress blog, and as a test I also enabled rel=authorship for a set of blog posts. (Tested both in Google's Rich Snippets Tester.) However, on the individual blog posts the publisher credit disappears. Is there a way to enable both to appear on blog posts?
Technical SEO | | ufmedia0 -
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 -
Iframes & SEO
I've got a client that wants a site with all content in iFrames. They saw another site they liked & asked if we could do it. Of course we can technically. How big a negative hit would they take with SEO? Is there anything we can do to mitigate it, such as redirects, etc? Thanks for the help!
Technical SEO | | wcksmith0 -
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 -
Duplicate canonical URLs in WordPress
Hi everyone, I'm driving myself insane trying to figure this one out and am hoping someone has more technical chops than I do. Here's the situation... I'm getting duplicate canonical tags on my pages and posts, one is inside of the WordPress SEO (plugin) commented section, and the other is elsewhere in the header. I am running the latest version of WordPress 3.1.3 and the Genesis framework. After doing some testing and adding the following filters to my functions.php: <code>remove_action('wp_head', 'genesis_canonical'); remove_action('wp_head', 'rel_canonical');</code> ... what I get is this: With the plugin active + NO "remove action" - duplicate canonical tags
Technical SEO | | robertdempsey
With the plugin disabled + NO "remove action" - a single canonical tag
With the plugin disabled + A "remove action" - no canonical tag I have tried using only one of these remove_actions at a time, and then combining them both. Regardless, as long as I have the plugin active I get duplicate canonical tags. Is this a bug in the plugin, perhaps somehow enabling the canonical functionality of WordPress? Thanks for your help everyone. Robert Dempsey0