Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Customizing WordPress - Ioannis Karavas Softwar...
Search
WordPress Greek Community
April 28, 2015
Technology
2
380
Customizing WordPress - Ioannis Karavas Software Engineer
WordPress Greek Community
April 28, 2015
Tweet
Share
More Decks by WordPress Greek Community
See All by WordPress Greek Community
Thanassis Zannias - Flexible WordPress Dev Environment with Docker
wpgr
0
6
Andreas Karavanas - AI Supercharged Landing Pages
wpgr
0
9
Όμορφα, γρήγορα και οικονομικά websites με WordPress
wpgr
0
9
Unlocking creativity - Marilia Darilli
wpgr
0
28
Έλλη Μουχτάρη - Χτίσε το προσωπικό σου brand και απόκτησε τους πελάτες που θες
wpgr
0
21
Ioannis Kastorinis - WooCommerce technical automations in the real world
wpgr
0
32
Christos Paloukas - Cache me if you can, a journey through caching layers in WordPress
wpgr
0
40
Ευάγγελος Πάλλης - Malware Cleanup & Protection
wpgr
0
42
Νίκος Μαυράκης - Κοστολογώντας τη δημιουργικότητα
wpgr
0
29
Other Decks in Technology
See All in Technology
Claude Code Actionを使ったコード品質改善の取り組み
potix2
PRO
4
1.7k
In Praise of "Normal" Engineers (LDX3)
charity
3
1.2k
AIにどこまで任せる?実務で使える(かもしれない)AIエージェント設計の考え方
har1101
3
1.3k
_第3回__AIxIoTビジネス共創ラボ紹介資料_20250617.pdf
iotcomjpadmin
0
140
Liquid Glass革新とSwiftUI/UIKit進化
fumiyasac0921
0
140
ユーザーのプロフィールデータを活用した推薦精度向上の取り組み
yudai00
0
490
Amazon ECS & AWS Fargate 運用アーキテクチャ2025 / Amazon ECS and AWS Fargate Ops Architecture 2025
iselegant
16
4.7k
Agentic Workflowという選択肢を考える
tkikuchi1002
1
390
データプラットフォーム技術におけるメダリオンアーキテクチャという考え方/DataPlatformWithMedallionArchitecture
smdmts
5
570
Model Mondays S2E02: Model Context Protocol
nitya
0
190
PHP開発者のためのSOLID原則再入門 #phpcon / PHP Conference Japan 2025
shogogg
1
370
Wasm元年
askua
0
100
Featured
See All Featured
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
34
3k
Building Better People: How to give real-time feedback that sticks.
wjessup
367
19k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
29
9.5k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
26
2.8k
The Power of CSS Pseudo Elements
geoffreycrofte
77
5.8k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
124
52k
Making the Leap to Tech Lead
cromwellryan
134
9.3k
Site-Speed That Sticks
csswizardry
10
650
Git: the NoSQL Database
bkeepers
PRO
430
65k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
16
940
jQuery: Nuts, Bolts and Bling
dougneiner
63
7.8k
BBQ
matthewcrist
89
9.7k
Transcript
Customizing WordPress Customizing WordPress Ioannis Karavas Software Engineer
Music Industry E-commerce Organizations Who uses WordPress?
WordPress is customizable WordPress is customizable
Filters Filters
Filters Filters <?php add_filter( 'body_class', 'gimme_browser' ) ?> function gimme_browser($classes)
{ global $is_IE, $is_opera, $is_chrome, $is_iphone; if ($is_chrome) $classes[] = 'chrome'; elseif ($is_opera) $classes[] = 'opera'; ... return $classes; }
Actions Actions
Actions Actions add_action( 'user_register', 'handle_new_user' ); function handle_new_user($user_id) { $user_info
= ... $new_post = array( 'post_name' => $user_name, ... 'post_excerpt' => '...', 'post_content' => 'Prompt user...' ); wp_insert_post( $new_post, $wp_error ); }
Child Themes Child Themes
Child Themes Child Themes function child_styles() { wp_enqueue_style( 'parent-style', get_template_directory_uri().'/style.css');
} add_action( 'wp_enqueue_scripts', 'child_styles' ); functions.php is not overwritten!
Roles & Capabilities Roles & Capabilities
Roles & Capabilities Roles & Capabilities function restrict_editor() { $editorRole
= get_role( 'editor' ); $capabilities = array( 'edit_others_posts', ... ); foreach ( $capabilities as $capability ) { $editorRole->remove_cap( $capability ); } } add_action( 'init', 'restrict_editor' );
add_action( 'init', 'add_new_role' ); function add_new_role() { add_role( 'junior', __('Junior'),
array( 'read' => true, 'edit_posts' => true, 'delete_posts' => false, ) ); } Roles & Capabilities Roles & Capabilities
Custom Post Types Custom Post Types
Custom Post Types Custom Post Types add_action( 'init', 'create_custom_post_type' );
function create_custom_post_type() { register_post_type('projects', array( 'labels' => array( 'name' => __('Projects'), 'singular_name' => __('Projects'), ) ... ) ); }
WordPress WordPress Customization Customization
Thank you! Thank you! Ioannis Karavas Software Engineer