We want our customers to initially see the general effect of the wordpress theme thousands of miles away. Although the effect picture is beautiful, it is more intuitive and flexible to let customers see the general effect of the wordpress theme in the browser. After all, the customer's ultimate demand is to show the effect of the wordpress theme template on the website. However, developing a wordpress theme template is not a task that can be completed quickly, especially for those powerful wordpress theme templates, which involve many aspects. Therefore, in the early stage of development, it is impossible for us to do so and let customers see the effect of dynamic web pages.
Therefore, in the early stage, we can only ask the front-end engineer to combine the screenshots into a wordpress static code template through HTML and CSS code. This has two advantages:
1. It can make customers more intuitive to see the effect of WordPress theme on the website;
2. You can subtract the work of writing HTML static code by the backend engineer of the wordpress theme, and you can concentrate on writing PHP dynamic code.
So, how should front-end engineers write static code templates for wordpress topics?
1: Write according to some general specifications of the wordpress topic.
I once encountered such a situation. After the front-end engineer gave me the wordpress static code template, I encountered several places where it was not easy to use wordpress functions to achieve the same effect. For example, the top navigation menu. The wp_nav_menu() function provided by wordpress creates the menu list code as follows:
<li id="menu item 7164" class="menu item"><a target="_blank" href="/">Home Page</a></li>
<li id="menu item 7152" class="menu item"><a target="_blank" href="/">wordpress Enterprise Template</a></li>
<li id="menu item 7153" class="menu item"><a target="_blank" href="/">Wordpress CMS Topic</a></li>
Or directly use the "a" label:
<a target="_blank" href="/">Home Page</a>
<a target="_blank" href="/">Wordpress Enterprise Template</a>
<a target="_blank" href="/">Wordpress CMS Topic</a>
However, the code of the static template given to me by the front-end engineer uses div as the label of the menu list, as follows:
<div class="menu item"><a target="_blank" href="/">Home</a></div>
<div class="menu item"><a target="_blank" href="/">Wordpress Theme Template</a></div>
<div class="menu item"><a target="_blank" href="/">Wordpress Portal Theme</a></div>
Although we can use it through some related code processing, it will cost us development time. Isn't the goal of using wordpress programs to build websites is to make it easy and fast to develop? If the back-end engineer has to deal with this matter every time, it will affect the entire development progress. Therefore, when developing wordpress static templates, front-end engineers must follow the relevant wordpress specifications.
2: Develop several front-end static templates according to the renderings.
Front end developers generally only need to develop static templates according to the renderings provided by artists. When designing renderings, art designers are also based on the general needs of the website. A website, under normal circumstances, mainly includes: website homepage, website category directory page, website article details page, some independent pages (such as about us), and website search page. Of course, some websites have other pages. However, these are the main pages. Therefore, front-end engineers should prepare the following static templates:
1. Static code template on the homepage of the website;
2. The static template of the article list page;
3. The static template of the article details page;
4. Single page static template;
5. Static template of search page;
6. The static template of the tag page;
Of course, the above is a regular page static template. Different customers have different needs. For example, enterprise websites may need product display list pages, product sales pages, company promotion activity list pages, etc. These pages may be another page layout. Therefore, corresponding static templates should also be written for them.
In a word, you only need to pay attention to the above two points when writing the static code template of the wordpress theme. After all, the focus of wordpress theme development is on the writing of dynamic code. Most customer needs will be reflected in the dynamic code template of wordpress theme. Therefore, we will spend more time on the WordPress theme dynamic template.