How to apply a design to the WordPress themes

Viewing 1 post (of 1 total)
  • #23136

    In the last articles we have seen how to create a template from scratch and we have started working with the PHP API of WordPress to control the behavior of the contents managed by this CMS with its own themes. However, until now it was all simple text and a template should stand out visually with other types of elements. In this article, we take a step further in the creation of themes in WordPress and review how to apply the design and web layout we want to our templates and easily integrate the external files we need (images, CSS, etc.)

    To define the aesthetic aspect of our own template that we develop for WordPress, we only have to use the same ingredients that are commonly used in the development of websites. That is, CSS style sheets, images and various components according to the needs of the project, but that we will have to integrate into our own theme.

    Integrate the stylesheet of the template
    As we explained in First steps to create WordPress themes , any WordPress template has a main CSS file, in style.css . That file has been necessary to create our first theme, but for now we have only placed a set of metadata. There you must write all the CSS we need for the website.

    The style sheet of a template contains the CSS that a traditional site would have. The only detail we need to make in WordPress is to link it properly. Obviously, you can not directly use an absolute path, because the template should adapt to any domain that the website may have where you want to apply and to any route where WordPress is installed within a domain. It is also not possible to use a relative path, since the template could also be installed in different folders, or have child themes that inherit from this template.

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.