What to do after you purchased a WordPress theme from one of the theme marketplaces? A brief description of DigitalOcean combined with ServerPilot which serves as an intro to building a child theme.
3. DigitalOcean
• Prilično jeftino
• Jednostavnost
• Popularnost (brdo članaka i tutorijala za sve i svašta)
• Eventualni minus je što dobijete skoro pa ništa,
samo OS instalirani
digitalocean.com
6. ServerPilot
• Jednostavan Control Panel (putem kojeg jednostavno dodajete
aplikacije ili WordPress webove)
• Automatska konfiguracija servera (Nginx, Apache, PHP-FPM,
MySQL), više PHP verzija paralelno (izvrsno za testiranje)
• Zaštita servera i webova (automatske nadogradnje, firewall,
zatvoreni portovi, SFTP, izolacija aplikacija - jedna aplikacija =
jedan korisnik)
serverpilot.io
9. Child tema
• Što je child tema
• Zašto raditi child temu
• Minimalni zahtjevi (direktorij od teme, style.css,
functions.php)
codex.wordpress.org/Child_Themes
11. style.css
/*
Theme Name: Trucking Devz Child Demo
Theme URI: http://pixel-industry.com/wordpress/trucking
Description: Trucking is WordPress theme created for logistics,
trucking and transportation companies as well as for small
freight business.
Author: pixel-industry
Author URI: http://pixel-industry.com
Version: 1.0
Template: trucking
Tags: white, four-columns, responsive-layout, custom-menu,
featured-images, post-formats, theme-options, threaded-comments,
translation-ready
*/
12. Parent style.css
// functions.php
function devz_demo_enqueue_styles()
{
wp_enqueue_style('prnt', get_template_directory_uri().'/style.css');
}
add_action('wp_enqueue_scripts', 'devz_demo_enqueue_styles');
// style.css
import(“../trucking/style.css”);
Ispravan način (best practice)
Stari način
13. Korisno je znati
• functions.php child teme se loada prije functions.php
parent teme
• if (function_exists(‘naziv_funkcije’))
• get_template_directory_uri() vs
get_stylesheet_directory_uri()
• load_child_theme_textdomain()