Wordpress theme localization - wordpress

Am working on a simple page using Wordpress. It's a simple web with mostly static content that is going to be updated rarely, let's say once per month.
The content will consist of cca 20 pages that are going to be edited by the site admin. No posts, no discussion forums or so.
I need to localize these pages to three langauges. My idea is to create three versions of each Page and that's it. Let's say index_en, index_de, index_es etc. So far so good.
But there is going to be a custom theme with generic header, footer and menu and all these will contain strings that needs to be translated. I intend to have language switcher in the header (probably small flag icons) and on language change I would navigate to relevant page eg. "index_de" for German. But how can I change the language for the theme itself - the strings in the header, footer and menu...
My supplier offers me three options
automated translation by Google Translate (not a good option)
tree installations of Wordpress - one for each language, not very comfortable from maintenanace point of view
plugins (TranslatePress, WPML, ...), always paid as recurring subscription. Not very good option from costs point of view.
I really can't believe there is no simple option for such a task that nearly everyone needs to resolve... Any ideas how to do that?
thanks
Jiri

Related

WordPress technical theme design

In a typical WordPress project I guess there are 3 parties. Party 1 is the graphic designer providing psd/pdf or html that party 2 (the developer) will create a theme from with probably some custom posts so party 3 (the client and content editor) can update the site without messing up the design and with no knowledge about HTML, JavaScript, Gimp or PHP.
This would tie the main theme of the site or it's specific pages in the php page(s) and if some minor design changes need to be made it needs to be done through editing php files.
I was thinking the following for a theme design:
(assuming a content only site without having complicated sales statistics and such)
Instead of "programming" the page.php to fit the graphic design and bring in specific (custom) posts and other data I would have the page.php bring in sub content. This so the graphic designer can create the page without having to program.
When images need to be provided then wordpress can pre scale/crop for different screen sizes.
The entire page should be created from the editor by the designer NOT the editor/client and not in page.php:
<html {{lang}}>
<title>{{title}}</title>
...
{{main-slider}}
JS and css are added through custom fields so they can be merged to one file.
Main slider post looks like this:
<div id="main-slider">{{main-slider-content}}</div>
JS and css can be provided to overrule page css or js and will be merged to one file.
And the main-slider-content is content that the editor can provide through a custom post provided by the programmer that will hold the editor's hand all the way and makes sure everything goes right.
Some of these fields can be set with custom fields values of the page (reverting to defaults if missing) some will be overwritten by the post (like language or title).
The type of sites that will be produced by this theme are used by small business owners who would like some web presence.
I have a couple of doubts about the design and hope someone with more experience with wordpress can shed some light on this.
When the editor/client edits a custom post like some slider content they cannot preview the item because that content is basically used on every page. Even if I find a way to list pages where the slider is used and show that one it won't show the new content until it's published. Previewing pages seems a bit complicated to implement.
It takes longer to generate the pages because content and sub content needs to be fetched from the database after parsing the content. I've tried to do this with DOMDocument before and used <div data-custom-content="main-slider"></div> but that is too slow so I'll try with regexp.
Because content isn't going to change that much I thought maybe APC cache the page after a first request and serve it from there. Delete the cache only when something is updated. On VPS the cache could be (probably would be) trashed when the site is inactive for a long time (which would be quite often). This means that requests take a long time to process when people try to view the pages.
Anyone with experience or helpful tips in this
[UPDATE]
I see that particular design and the html template will still have strong dependencies on each other. I am thinking now of trying out Twig. The benefit will be that re usable components are classes that can be added to the project and full content is controlled in the wordpress editor in a way that someone with no programming experience can still manage the content.
When data needed in the page is going to change a programmer is going to be needed though.
This is kind of what the Advanced Custom Fields Flexible Content system does, and the way you've styled your examples looks very like Smarty, a templating system that used to be very popular, and which is still used by a few systems like Prestashop.
In my experience, this removing the middleman kind of idea doesn't work. You either need a very extensive - and therefore bloated - initial theming system to flex to different projects, or you need a basic one which a developer will customise later - in which case the best you can achieve is moving the developer's role to a different phase of the project.
Overall, I think the best scope for this type of idea is for designers to learn a bit more code.

Is WordPress suficient for this project or should I use a framework or a different CMS?

I am a web Designer that recently decided to expand into developer waters as well :). What I have in mind is to build an elaborate portfolio site that will also contain a blog. The sites sections will be standard for such a project - something like Home, About, Portfolio, Contact and Blog.
The Home page will contain some static parts but also feeds from the latest additions to the portfolio and the blog.
The Portfolio page will have sections on the different types of portfolio pieces (like logo, print, web etc).
The About will be completely static.
The Contact page will be static and will have a contact form.
The Blog page will basically have your standard WordPress blog structure.
At first I was thinking of doing the whole thing in WordPress (since I already have some experience with it) but what got me thinking about different options was the portfolio part. I want the portfolio page to be quite differently stylized than the blog page and yet I want to have the possibility of doing quick and easy additions to it trough an admin panel.
So please give me suggestions and direction about what would be best for me to do? Is this thing possible with WordPress? Should I instead code the whole project with CodeIgniter (or a similar framework)?
I am quite good with HTML & CSS. Comfortable with jQuery. Trying to get better with PHP :).
I am willing to learn and improve and wouldn't mind trying a CMS or a Framework that Ive not had experience with before.
Thank you.
Wordpress is more than sufficient. You might want to find some plugins that allow you to add special content like videos, scripts and other things to portfolio pages. Also knowing html, css well is important if you want to build or modify a theme a lot to your liking. It is also very helpful to know some php if not be very experienced with it. MySql is helpful as well but not as need to know.
This Wordpress PHP function sheet is very helpful at times.
The Wordpress Codex page is also very good. Not an end all be all, you'll still need to know how to do things on your own, but it defiantly will get the ball rolling if want want any custom functions, or want to modify functions.
If you know wordpress a little bit, I hope you will able to make your desired project. Using wp you can do several types of project.
Read some wp books or tutorial and learn wp functions.
Essential wp functions sheet https://codex.wordpress.org/Function_Reference
I hope it will help you.

How to Build WP Site with Hierarchical Content and Using Custom Design?

A client asked me to redesign her web site, built several years ago in WP by another developer. Although I've never worked with WP before, I'm pretty comfortable with html, css, and php, and I more or less understand how WP stores content and dynamically builds pages. But I'm wondering how to approach these challenges:
My client's site has about 75 pages. There are about 25 that are static (i.e. the content changes infrequently if at all; things like "about us" and "faqs") and there are about 50 pages that are more "blog-like", except that instead of posts, the content contains directory-type info (e.g. 12 DJs in the area) or event-related info (e.g. upcoming shows at local theaters). Both of these categories contain many sub (and sometimes sub-sub) categories (e.g. medical services > pediatric > kid allergy specialists) and the content updates fairly frequently.
I understand the difference in WP between "pages" and "posts". But I need to find out the best way to structure the static content. Should I just set up a parent/child hierarchy of pages, changing the permalinks to something that makes sense? Or is it better / easier to just build the static pages outside WP and somehow link to them from the common navigation?
As a web designer, I want to "wow" my client with a great design. While there are loads of wonderful WP themes available, I really need to create something unique. But I'm wary of breaking something, so what's the best way to take an existing theme and just tweak it enough to make it look a little different?
Finally, other than mounting a massive "copy and paste" effort when the new site is built, is there a way to transfer content from the original site to the new one?
By reading your question, it seems to me that choosing WP for this kind of website was a bad choice.
Redesigning it, though, won't be that hard if it's using page templates for pages.
And yes, there's a import/export tool in WP to tranfer content. (see administration panel)
I, really, advise you to read this great tutorial about creating WP themes.
I've a blog-like WP site myself (contains RPG development articles). Here's what I did. Nested static pages simply have parent-child hierarchy: /about/mingos - that's easy to understand and i value this kind of content organisation (personal opinion).
As for themes, there's a no-brainer tool that, while not exactly apt for real business, has the capability of letting you see how stuff will look in seconds, and can sometimes give you great ideas. It's called Artisteer and there's a demo on its site that you can have a look at. Try your design ideas with it, see how stuff will look like. I'm sure you can come up with some great ideas for a "wow" design :).
Exporting content, as Soufiane Hassou remarked, is possible from within the admin panel.
Don't rule out using categories to create your hierarchy. That way you'd get the benefit of cross categorization of DJs and venues by location to create a robust cross reference system. Pages don't get this benefit without extra work.
To make this in to a directory, though, is gonna either be heavy work on managing the pages or heavy work on creating a solution that will cross reference everything and bring the content together in a usable way on the front end.

How to generate and maintain lots of Landing Pages?

Currently I have to think of a solution for generating and maintaining lots of static landing pages for a membership-only e-commerce site (e.g. we sell products X, Y and Z but only to our members and we want to make a (SEO-friendly) landing pages for each product). Each page would be almost unique in content and the meta data but they would have almost always the same design / template.
The easiest approach short-term would be to code everything by hand in PHP, but the quantity would make it really cumbersome to maintain them; furthermore, it is possible that some people from the marketing department would like to generate and administer their own landing pages, none of them are tech-versed (not even basic html-tags). Therefore, I was thinking of using Wordpress and modifying it for my purposes.
Is this a good idea?
Is there a CMS better suited for this task?
Could you recommend me a better approach?
I would not recommend wordpress for an e-commerce site, as it designed primarily to be a blog and therefore would not be particularly easy to adapt.
You may want to look at OScommerce, or another open source e-commerce CMS. These would probably best suit your needs, especially if you wish to actually accept payment online.
PHP is a GREAT way to maintain what you are trying to do. Essentially you said only the content will change. With PHP, you can simply include all of the templates for re-use over and over again, and then you only need to deal with the content itself, which, if you know how to use Server-Side-Includes, can be done by as easily as swapping .txt files that contain your content.
Take a look at this video tutorial http://carsonified.com/blog/design/how-to-design-a-portfolio-site-part-2/, it is not exactly the same thing but look how he uses Wordpress 'customs fields'.
Basically, you create a template landing page with placeholder variables for the parts that change with each page (title, product name, etc.) and then on the post page you can add custom fields that will populate that information.

Can a WordPress site be made to be more than a blog?

I want to use WordPress for my personal website, but it isn't going to be structured like a blog. Can someone help me with a few concerns I have before I get too deep into it?
I want it to have a main page, and a hierarchy of content pages. Can I make the default page be a home page, and not a big chronological listing of posts?
I see that the DotNetNuke CMS has built-in support for auto generating your menus based on the pages you create. Does WordPress have anything like this?
Can I make the blog post section come up in a sub-directory like mysite.com/blogposts?
Is there anything about WordPress that makes it an obvious bad choice for a general purpose website? Does it have extensibility for thinks like shopping carts or whatever in case I want to add them in the future? I just want to make sure I am not doing something stupid by choosing a blogging software for a general purpose website with future requirements that aren't yet known.
Yes, current versions of Wordpress support designating a content page as the home page.
Yes, Wordpress will generate a set of nested lists that represent your content pages; it would be the job of the theme to style this into an appropriate menu (and most themes do not).
You can set up your permalink structure to do this, yes.
Wordpress is a good choice up to a point for many kinds of web sites, but if you want to integrate with a shopping cart or other complex application, I'd suggest looking at Drupal instead. Wordpress's developer ecosystem is mostly set up around extending its existing capabilities (blogging and content management) not on adding other unrelated functionality. Drupal is much more of a general-purpose framework for any kind of application or site.
I've set up Wordpress for several non-blog sites without issue.
Yes, you can create a static Page in Wordpress and set it as the default page. Read more about Wordpress Pages here: http://codex.wordpress.org/Pages
Yes, you can generate menus of Pages, both flat and hierarchal. Most themes will include a Page sidebar that will show Pages you have created. You can of course code and style your own to your liking. For example, this bit of php will pull out the top level Pages in your hierarchy and generate html for a series of <li> elements:
wp_list_pages('meta_key=page_title&depth=1&sort_column=menu_order');
Yes, you can have the blog section come up as a subdirectory.
Wordpress is a fine choice for a general purpose personal or even small business website. It only takes a little effort to convert your own custom layout into a Wordpress Theme, or you can choose from thousands of ready made Themes. You can do a lot with the base install, and its always being updated. Plugins and Widgets allow you to add all sorts of new functionality to Wordpress with ease. If all else fails, you can always write your additions own with a little effort.
That said, Wordpress is primarily blogging software. It has some decent CMS features, but its not the core focus. If you aren't going to do any actual blogging, Drupal is a solid option.
I'm not a heavy user of WordPress but my feeling for it is that it is primarily a blogging tool. It sounds like you want a full CMS. I'd have a look at Drupal (as PSU_Kardi suggests) or Joomla. Both have built-in support for or add-ons for blogs, e-Commerce, ...
2: Multi-level navigation plugin: http://pixopoint.com/multi-level-navigation/
4: Some e-commerce plugins: http://wordpress.org/extend/plugins/search.php?q=e-commerce
Yes, available by default, configurable via control panel
Yes, it's usually on by default on modern templates (unless you're using something extremely exotic)
Yes, you can do pretty much everything with permalinks
I really don't see a reason why wouldn't you choose wordpress... many plugins available for this platform can do almost everything - even more than standard cms solutions. There are SEO plugins, e-commerce plugins, security plugins, forum plugins, modern anti-spam protection, design enhancements, advanced templates with easy to use control panels...

Resources