theme structure independence from site content during development
-
Hi ! This is my first post on this forum (first ever related to web-design).
As title says : i’m in process of learning how to create a theme from a source PSD file and (after sifting trough all the static html/css stuff) and i’ve run into this “brick wall” : i see a lot of FAQs, helps, videos that explain how to make new theme but at the same time content is created, often BEFORE completion of theme !?
If themes are supposed to work out-of-the-box, why would anyone rely on existing content to create theme’s dedicated structure ? What happens when theme is packaged and sent to whoever wants to use it ? Theme falls apart because there won’t be any compatible content, or even worse, theme will find content that is not intended to be displayed that way (Example: archive ending up in home page. Unlikely, but still …).
Another problem (well, somewhat connected to the above) i have is how to make a completely custom template file. Example: in source PSD there can be content that is pretty much static or does not fit into usability category of usual template files (404, home, sidebar, header, footer etc …). What is the “cleanest” way to implement custom template file for my theme ? I mean how to call it from normal template files (that are called first) ? Does it need some kind of registering (if it does, what wp_ function is used ?) and other preparations.
One more left (again similar to above) : I’m kind of confused – theme i create can have either links hard-coded in it (like About, Contact, Location etc) or links that obey site content and will dynamically display.
In first case, user will have to look into theme files and create content that matches links in theme (a post, page or media library item with correct ID or name) – a big no-no in my opinion.
In second case, i will make use of wp_ functions and display links from site content, but i think i will also have to create theme-specific extra options for admin panel so that user can make a “bridge” between what theme shows (links) and what content has available (IDs or names).
One good example (in my opinion) of available site content VS theme structure is when i freshly installed wordpress with default twentyten theme, erased all content and looked at start page again. Theme did not fall apart and was still usable.
I can now understand if someone would discourage me from use of links in page header/footer areas …
- The topic ‘theme structure independence from site content during development’ is closed to new replies.