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
11
Andreas Karavanas - AI Supercharged Landing Pages
wpgr
0
16
Όμορφα, γρήγορα και οικονομικά websites με WordPress
wpgr
0
22
Unlocking creativity - Marilia Darilli
wpgr
0
50
Έλλη Μουχτάρη - Χτίσε το προσωπικό σου brand και απόκτησε τους πελάτες που θες
wpgr
0
33
Ioannis Kastorinis - WooCommerce technical automations in the real world
wpgr
0
49
Christos Paloukas - Cache me if you can, a journey through caching layers in WordPress
wpgr
0
55
Ευάγγελος Πάλλης - Malware Cleanup & Protection
wpgr
0
63
Νίκος Μαυράκης - Κοστολογώντας τη δημιουργικότητα
wpgr
0
45
Other Decks in Technology
See All in Technology
なぜテストマネージャの視点が 必要なのか? 〜 一歩先へ進むために 〜
moritamasami
0
120
サンドボックス技術でAI利活用を促進する
koh_naga
0
190
Platform開発が先行する Platform Engineeringの違和感
kintotechdev
2
400
[ JAWS-UG 東京 CommunityBuilders Night #2 ]SlackとAmazon Q Developerで 運用効率化を模索する
sh_fk2
1
130
ZOZOマッチのアーキテクチャと技術構成
zozotech
PRO
3
1.3k
AWSを利用する上で知っておきたい名前解決のはなし(10分版)
nagisa53
1
290
AWSで始める実践Dagster入門
kitagawaz
0
260
「魔法少女まどか☆マギカ Magia Exedra」での負荷試験の実践と学び
gree_tech
PRO
0
580
現場で効くClaude Code ─ 最新動向と企業導入
takaakikakei
1
110
Language Update: Java
skrb
2
260
iPhone Eye Tracking機能から学ぶやさしいアクセシビリティ
fujiyamaorange
0
630
機械学習を扱うプラットフォーム開発と運用事例
lycorptech_jp
PRO
0
170
Featured
See All Featured
Testing 201, or: Great Expectations
jmmastey
45
7.6k
4 Signs Your Business is Dying
shpigford
184
22k
Product Roadmaps are Hard
iamctodd
PRO
54
11k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
Mobile First: as difficult as doing things right
swwweet
224
9.9k
Build The Right Thing And Hit Your Dates
maggiecrowley
37
2.8k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.1k
Navigating Team Friction
lara
189
15k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
Docker and Python
trallard
45
3.5k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
A designer walks into a library…
pauljervisheath
207
24k
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