Website Development Prices

Website Development Prices

Friday, February 21, 2020

How to code Wordpress theme from zero - Part 3

Adding sections to page

29) Go to page.php and copy all code. Go to content-template.php and paste it under comment. All code is:

<?php

/*
Template Name: Contact Me page template
*/

?>

<?php get_header();?>

<div class="container">

<h1><?php the_title();?></h1>

<?php get_template_part('includes/section', 'content');?>

</div>

<?php get_footer();?>

After h1 tag add this

<div class="row">
   <div class="col-lg-6">
      This is for contact form.
   </div>

Then cut include part line of code and paste it to second column.


Thursday, February 20, 2020

How to code Wordpress theme from zero - Part 4

36) This will add Menus in Appearance. Go to functions.php and at the end of the code add

add_theme_support('menus');

37) Go to Appereance -> Manus to create a menu. On the right side click button Create Menu. And name it as you want, I called my Top Menu. On the left side under the Pages check box next to Select All then click Add to Menu. Arrange pages. No click Save Menu.




Creating Navigation Menu

38) Go to functions.php to create a menu.

How to code Wordpress theme from zero - Part 2

Adding css and js files

22) We need to download Bootstrap. Open bootstrap folder, copy css folder and paste it to theme folder. Do the same for js folder. Still in theme folder, create new folder and name it images.





23) We will include bootstrap css and js files. Go to functions.php and add this code:


How to code Wordpress theme from zero - Part 1

You will need XAMPP and Wordpres. How to install wordpress using XAMPP.

1. Find XAMPP. Open Windows Explorer, on the left side click on Local C disk, in the up right corner type "xampp" and press Enter. You are looking for xampp icon with text xampp-control. When you see it press red X in up right corner. Then double click on it. XAMPP window will open.





2) Start Apache and MySql. Click start button in line with Apache and click start button in line of MySql. They should be both in green. Close the window by pressing X.


How to code Wordpress theme from zero

How to code Wordpress theme from zero - Part 1 = stting up coding environment and making basic files.

How to code Wordpress theme from zero - Part 2 = adding, css and js files, creating content and template.

How to code Wordpress theme from zero - Part 3 = adding sections to pages.

How to code Wordpress theme from zero - Part 4 = creating and styling navigation menu and footer menu.

How to code Wordpress theme from zero - Part 5 = creating blog.