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
370
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
CSS 101: Τα μυστικά του στυλ - Χάρης Βαλτζής
wpgr
0
8
Ολοκλήρωσα το SiteΜουNowWhat? - Στέφανος Παρασκευόπουλος
wpgr
0
7
Effective personal and business branding - Maria Zarotiadou
wpgr
0
9
Web Accessibility: Hardships, pitfalls, opportunities, and preparing for European Accessibility Act 2025 - Χρήστος Μπαφέρας
wpgr
0
15
Code, Test, Repeat: Accelerating Development with WordPress Playground - Uros Tasic
wpgr
0
12
Make your users’ search experience great - Nico Orfanos
wpgr
0
19
WooCommerce Automations: Revolutionizing eCommerce with Practical Solutions - Ioannis Kastorinis
wpgr
0
20
Block themes: The future of Full Site Editing and what to expect from WordPress 6.7 - Alexandros Kaounas
wpgr
0
17
Forking the GPL way - Βαγγέλης Παπαϊωάννου, Ορέστης Σαμαράς
wpgr
0
13
Other Decks in Technology
See All in Technology
テストを書かないためのテスト/ Tests for not writing tests
sinsoku
1
140
ハイテク休憩
sat
PRO
2
190
20241125 - AI 繪圖實戰魔法工作坊 @ 實踐大學
dpys
1
430
[トレノケ雲の会 mod.13] 3回目のre:Inventで気づいたこと -CloudOperationsを添えて-
shintaro_fukatsu
0
120
I could be Wrong!! - Learning from Agile Experts
kawaguti
PRO
8
1.7k
OCI技術資料 : ファイル・ストレージ 概要
ocise
3
12k
いまからでも遅くないコンテナ座学
nomu
0
190
株式会社ログラス − エンジニア向け会社説明資料 / Loglass Comapany Deck for Engineer
loglass2019
3
33k
普通のエンジニアがLaravelコアチームメンバーになるまで
avosalmon
0
650
The future we create with our own MVV
matsukurou
0
900
20241228 - 成為最強魔法使!AI 實時生成比賽的策略 @ 2024 SD AI 年會
dpys
0
330
PHP ユーザのための OpenTelemetry 入門 / phpcon2024-opentelemetry
shin1x1
3
1.6k
Featured
See All Featured
Rails Girls Zürich Keynote
gr2m
94
13k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
28
2.2k
YesSQL, Process and Tooling at Scale
rocio
170
14k
Being A Developer After 40
akosma
89
590k
Building a Modern Day E-commerce SEO Strategy
aleyda
38
7k
The Invisible Side of Design
smashingmag
299
50k
Optimising Largest Contentful Paint
csswizardry
33
3k
Scaling GitHub
holman
459
140k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
656
59k
The Pragmatic Product Professional
lauravandoore
32
6.3k
Build The Right Thing And Hit Your Dates
maggiecrowley
33
2.5k
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