Your local project
Once the project is installed locally and you open it in Visual Studio Code, it can feel overwhelming at first, so the key is knowing where each type of work lives.
Location of files
Section titled βLocation of filesβComponents
Section titled βComponentsβYouβll find components organized by category in the root of the project.
components/ βββ cards/ βββ c--card-a.php βββ c--card-b.php βββ g--card-01.php βββ ctas/ βββ c--cta-a.php βββ c--cta-b.php- Frontend work is hardcoded (HTML / CSS / JS)
- Backend work makes the same components dynamic using PHP
When making the scss of a component or module, please locate it in:
src/ βββ scss/ βββ framework/ βββ components/ βββ cards/ βββ _c--card-a.scss βββ _c--card-b.scss βββ _g--card-01.scss βββ ctas/ βββ _c--cta-a.scss βββ _c--cta-b.scssModules
Section titled βModulesβflexible/ βββ heros/ βββ hero-simple.php βββ modules/ βββ cards-with-icon.php βββ testimonials.php- We usually work with one hero and multiple modules per page.
- Module names are not random and must match the names defined in Figma
- Frontend makes modules hardcoded, backend makes them dynamic
Scripts
Section titled βScriptsβIf a component or module requires JavaScript:
src/ βββ js/ βββ modules/ βββ AccordionA.jsPages (templates)
Section titled βPages (templates)β- Pages are located in the root of the project.
- They are used to assemble modules and components together.
- Create a page template (for example,
page-andres) for your testing. - Each page must include: the template name, header and footer.
<?php/*Template Name: Insert here a name that'll help you locate it*/?>
<?php get_header(); ?>
// Your Content Here
<?php get_footer(); ?>- Whatever you add between the header and footer will be visible in your local WordPress site when using that page template.
Itβs important to watch this video to have full context of the explained topics. If the video doesnβt load or stops with an error, you can watch it directly on Loom.
Learn More
Section titled βLearn MoreβKnowledge Check
Test your understanding of this section
Loading questions...