WordPress Course – Learning PHP Basics – Lesson 1

Hey everyone, long time no see! I have started a new course which I am taking from youtube and it’s about WordPress, so I wanna share it with you guys.

On lesson one we are going to start by creating a a php file and having it hosted somewhere, I have created a dev enviroment with XAMPP and installed WordPress on it. Then on the root folder I created a experiment.php file and launched it with VS Code.

When we want to start coding with wordpress firstly we need to indicate we want to do so, and for that what we do is type <?php ?>, and in that space in between is where code is going to be written in.

Now for example, if we have along text where the same value, lets say a name, get repeated multiple times what we do is create a variable and this is done by typing $varname = 'John Dow', and if we want to put that on HTML we’d do This is <?php echo $varname ?> and he likes to code!

This is my little lesson for today, thank you for reading and see you next time!

Leave a comment

Design a site like this with WordPress.com
Get started