Website Development Prices

Search Blog

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:


Template Name: Contact Me page template


<?php get_header();?>

<div class="container">

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

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


<?php get_footer();?>

After h1 tag add this

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

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


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.

Sunday, February 16, 2020

How to add new user to Wordpress?

If you want to give other people access to your website you need to add new user(s). WordPress has five different user roles. They are:

  • Administrator has access to all the administration features within a single site.
  • Editor can publish and manage posts including the posts of other users.
  • Author can publish and manage their own posts.
  • Contributor can write and manage their own posts but cannot publish them.
  • Subscriber can only manage their profile.

1) Administrator user role can: write and edit Posts, create Pages, create Categories, moderate Comments, manage Plugins, manage Themes, and manage other Users, by assigning a specific role to each of the users.
2) Editor user role can: create, edit, delete and publish posts, even those belonging to other users. They also can edit and delete comments.
3) Author user role: create, edit, delete and publish their own posts. They can also upload media files.
4) Contributor user role can: edit and their own posts.
5) Subscriber user role can read all posts on the website.

To add new user:

1) Login to your wordpress website.
2) On left side, on Dashboard, hover over Users and from dropdown list click on All Users. 

3) You’ll have one user, administrator, who was created when you installed wordpress.  Administrator has the strongest role.
4) Click on Add new user button to create new user.
5) At the top of the page click on Add new button to add new user. In the Username field type the username, in this example, police1. In the email field type the users email. In the field First name and Last name, type first and last name of user. In the field Website type the website url of the user, if any, in this example, In the field Password click on the Show password button. WordPress will generate strong password. Make sure to make copy of this password to your computer and then on external hard drive or USB. Check field Send User Notification. And for the Role from dropdown menu pick one role for your new user, in this example, Editor.

6) Click on the Add new user button to create new user.

7. Tadaaaaa :)