Website Development Prices

Pretrazite Blog // Search This Blog

Saturday, February 22, 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.


Friday, February 21, 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:


Skola Internet Marketinga