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 Software Engineer
Search
WordPress Greek Community
April 28, 2015
Technology
2
340
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
Enhancing WordPress and WooCommerce - Case study of ymca.gr
wpgr
0
26
Κατανόηση της καταναλωτικής συμπεριφοράς και διαμόρφωση στρατηγικής
wpgr
0
27
Συνδυαστικές στρατηγικές για Επιτυχημένο E- Commerce, Online Merchandising και Digital Marketing
wpgr
0
39
Ρυθμίσεις & styling μλοκ με χρήση του theme.json
wpgr
0
74
Marketing στην πράξη το 2023
wpgr
1
44
Το Metaverse και πώς σχετίζεται με το WordPress!
wpgr
0
77
Γνωριμία με την ομάδα Training
wpgr
0
15
Στρατηγική SEO content για e-commerce websites
wpgr
0
48
Είμαι Freelancer, πώς να κάνω personal branding
wpgr
0
32
Other Decks in Technology
See All in Technology
アクセシビリティを考慮したUI/CSSフレームワーク・ライブラリ選定
yajihum
2
980
Next'24 事例セッションの紹介とクラウド資格を活用したキャリア形成について語りMuscle
yasumuusan
1
420
最近たまに見かけるTiDBってなんだ? - Findy
pingcap0315
2
750
「スニダン」開発組織の構造に込めた意図 ~組織作りはパッションや政治ではない!~
rinchsan
3
480
ServiceNow Knowledge 24の歩き方 EYストラテジー・アンド・コンサルティング
manarobot
0
170
サーバー間 GraphQL と webmock-graphql の話 / server-to-server graphql and webmock-graphql
qsona
2
170
Vertex AI を中心に 生成AIのアップデートを共有します
kaz1437
0
280
KubeCon EU 2024 Recap “Kubernetes Policy Time Machine: Where to Next?”
ryysud
0
190
ChatGPT for IT Service Management (IT Pro)
dahatake
7
1.4k
Meta Quest 3 で動く桜マシマシ WebXR アプリを IBM Cloud Code Engine と Babylon.js で作った話
1ftseabass
PRO
0
120
JSON攻略法.pdf
miyakemito
8
4.6k
継続的な改善 x ⾮連続的な進化
sansantech
PRO
3
130
Featured
See All Featured
Teambox: Starting and Learning
jrom
128
8.4k
A designer walks into a library…
pauljervisheath
199
23k
RailsConf 2023
tenderlove
2
530
Thoughts on Productivity
jonyablonski
57
3.8k
Designing the Hi-DPI Web
ddemaree
276
33k
GitHub's CSS Performance
jonrohan
1024
450k
BBQ
matthewcrist
80
8.8k
Building Adaptive Systems
keathley
30
1.9k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
19
1.9k
How to name files
jennybc
64
93k
In The Pink: A Labor of Love
frogandcode
138
21k
Web development in the modern age
philhawksworth
202
10k
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