[wordpress] How to get child theme / main theme path and URI?

Since WordPress 4.7, these functions are available: get_theme_file_uri() – if using a child theme, it will return the child theme’s full URI. Otherwise, it will return the main theme full URI. e.g. It’s also possible to send a subfolder/file as parameter, like so: get_theme_file_path() – same as get_theme_file_uri() but will return the full path of […]

[wordpress] Which template file should I use?

Here is a complete list of all existing wordpress template files and their meaning: index.php The main template file. It is required in all themes. style.css The main stylesheet. It is required in all themes and contains the information header for your theme. rtl.css The right-to-left stylesheet is included automatically if the website language’s text direction is right-to-left. comments.php The comments […]