Get started with building your first theme. We will cover the necessary files to get started, key functions to know, as well as some other solutions to jump start your development.
NewBCamp09: Turning your design into a WordPress ThemeAdam Darowski
At NewBCamp '09, I live-built the front page of a WordPress theme. Here are the slides I used before building to explain the parts of a WordPress theme.
An exploration into what a WordPress theme is. How does it work and what is it made up of?
If you're interested in getting into theme development this presentation will help you get started on that journey.
“A Full day of WordPress2.5, focused on design and development. We’ll cover the essentials of setup, installation, and management. We’ll learn how to build custom themes using CSS, PHP, and image
architecture. We’ll also jump into custom code and template files, best practices for design and management, integrating Flash, and how to build and install WP and custom plug-ins.”
Add-On Development: EE Expects that Every Developer will do his Dutyreedmaniac
Add-Ons are what make ExpressionEngine the flexible powerhouse that it is today. Being able to write your own simple plugins or incredibly expansive modules allows you to mold ExpressionEngine to nearly any task that your website might require. However, with that power comes a great responsibility to insure that your code is not slowing down the entire site or unduly stressing the server through bad code architecture.
There are simple tools already built into ExpressionEngine and PHP that you can use to see precisely what your Add-On is doing during page processing and where it might be doing more work than is absolutely necessary. Every developer should use these to optimize their work from the very beginning of development, prior to release. This workshop will explain these tools and how you can use them effectively. It will also delve deeper into optimization techniques and tricks that will keep your code light and clean, while finding a balance between functionality and performance.
NewBCamp09: Turning your design into a WordPress ThemeAdam Darowski
At NewBCamp '09, I live-built the front page of a WordPress theme. Here are the slides I used before building to explain the parts of a WordPress theme.
An exploration into what a WordPress theme is. How does it work and what is it made up of?
If you're interested in getting into theme development this presentation will help you get started on that journey.
“A Full day of WordPress2.5, focused on design and development. We’ll cover the essentials of setup, installation, and management. We’ll learn how to build custom themes using CSS, PHP, and image
architecture. We’ll also jump into custom code and template files, best practices for design and management, integrating Flash, and how to build and install WP and custom plug-ins.”
Add-On Development: EE Expects that Every Developer will do his Dutyreedmaniac
Add-Ons are what make ExpressionEngine the flexible powerhouse that it is today. Being able to write your own simple plugins or incredibly expansive modules allows you to mold ExpressionEngine to nearly any task that your website might require. However, with that power comes a great responsibility to insure that your code is not slowing down the entire site or unduly stressing the server through bad code architecture.
There are simple tools already built into ExpressionEngine and PHP that you can use to see precisely what your Add-On is doing during page processing and where it might be doing more work than is absolutely necessary. Every developer should use these to optimize their work from the very beginning of development, prior to release. This workshop will explain these tools and how you can use them effectively. It will also delve deeper into optimization techniques and tricks that will keep your code light and clean, while finding a balance between functionality and performance.
The Re-brand WordPress Admin is for developers who want to give their clients a more personalized and less confusing content management system with amazing look and feel.
Stepping into theme development can be daunting. Sure anyone with a little PHP skill and a basic understanding of the loop can create theme templates, but there are a number of things you can learn which can take your theme development to the next level. We’ll discuss the skills that can take you from a beginner theme developer to a master.
A video of this talk given in Boston, MA can be seen at https://www.youtube.com/watch?v=IdMEOO0JmZA
(Updated for 2017)
WordCamp NEO 2016 presentation "Custom Responsive Theme Workshop" by David Brattoli
While we could use many different frameworks, premium and free themes to build our sites, I have found you need a truly custom framework to build a base to build new themes quickly to meet your project needs. This method to create a framework and then to create a child theme for the look of the site, will allow you build future sites quickly and efficiently. The session will cover why we choose this method and framework, the challenges we faced, how we tackled the challenge, and what we ended up building to solve the problem. I'll also reveal the pitfalls we discovered and how we overcame those as well.
Coding samples can be found here:
http://bit.ly/wceno-crtw-samples
Lorelle VanFossen presents "WordPress and PHP," a quick review of how WordPress uses PHP from the core to design to WordPress Plugins. Presented originally at Clark College in Vancouver, Washington, for their PHP class, this presentation helps students understand the importance of PHP in WordPress. It also features the skill sets critical to learning WordPress from a coding and design perspective, and what it takes to become a WordPress developer and designer.
Drupal is an open source content management system (CMS) written in PHP. It is a publishing platform and used to create blog and enterprise applications. Drupal gives a strong base for organizing, structuring, creating, developing and managing web presence. Drupal has standard structure which makes it easier to access basic functionalities and source code to anyone who wants to work on it. It comes with multiple user features which allow creating multiple users and each can be assigned different roles and permission. Drupal has thousands of add-on modules and designs which enable to you to create a unique website that you desire. Its PHP based platform allows the safe and secure management of websites.
There is new slide for this at http://www.slideshare.net/catchinternet/contributing-to-wordpress-theme-review-at-wordpressorg
Guide to Start WordPress Theme Review. Useful for WordPress Theme Developers, wannabe WordPress Theme Developers and wannabe WordPress Theme Reviewer
How to Prepare a WordPress Theme for Public ReleaseDavid Yeiser
A presentation for WordCamp Louisville on how to prepare a theme for distribution. It mainly follows the theme review process outlined at WordPress.org. It also discusses reasons to release a theme and briefly highlights ways to stand out from the crowd.
Learn the basics of building WordPress themes. This presentation is appropriate for people who are somewhat familiar with PHP and databases.
To Learn More, check out http://techliminal.com
Drupal Theme Development - DrupalCon Chicago 2011Ryan Price
This class is intended for people who know some HTML and CSS, and covers the fundamental principles of Drupal theming geared toward people who wish to take a static mockup of a site design and turn it into a Drupal theme. You will also learn about using base themes, grid-based layout and helper modules to streamline and customize your Drupal theme.
Trainer Ryan Price has built entertainment sites, social networks, and eCommerce sites for clients including Popular Science, Field and Stream and Outdoor Life magazines. With over 10 years of experience building sites with PHP and other technologies, Ryan began immersing himself in Drupal around 2006. Ryan often teaches and writes articles along with Mike Anello, and the duo is also known for producing the DrupalEasy Podcast with their host Andrew Riley.
Build a WordPress theme from HTML5 template @ TelerikMario Peshev
How to build a WordPress theme out of HTML5 template, integrate dynamic components such as menus, sidebars and comment areas and use widget blocks for static sliced content.
at Telerik Academy, 19 Jun 2012
Using Curated Content in WordPress - Why and HowAdam W. Warner
Every day millions of websites, blogs and social channels create unique content that’s worth sharing – but how do you consume and share the best, most valuable and relevant content with your audience?
The answer is content curation.
In this session Adam will discuss the “why” and “how” of curating content from reputable sources, and how sharing that information in a centralized place adds value and helps to position your brand as a trusted news source for your niche.
Presentation delivered at WordCamp Raleigh on November 3, 2012. I discuss the benefits of choosing WordPress to power a non-profit website, point out special considerations and must-haves, list recommended plugins, and share resources available online to help non-profits with their websites. I draw from my experience as designer and webmaster for a house of worship and two other non-profits.
The Re-brand WordPress Admin is for developers who want to give their clients a more personalized and less confusing content management system with amazing look and feel.
Stepping into theme development can be daunting. Sure anyone with a little PHP skill and a basic understanding of the loop can create theme templates, but there are a number of things you can learn which can take your theme development to the next level. We’ll discuss the skills that can take you from a beginner theme developer to a master.
A video of this talk given in Boston, MA can be seen at https://www.youtube.com/watch?v=IdMEOO0JmZA
(Updated for 2017)
WordCamp NEO 2016 presentation "Custom Responsive Theme Workshop" by David Brattoli
While we could use many different frameworks, premium and free themes to build our sites, I have found you need a truly custom framework to build a base to build new themes quickly to meet your project needs. This method to create a framework and then to create a child theme for the look of the site, will allow you build future sites quickly and efficiently. The session will cover why we choose this method and framework, the challenges we faced, how we tackled the challenge, and what we ended up building to solve the problem. I'll also reveal the pitfalls we discovered and how we overcame those as well.
Coding samples can be found here:
http://bit.ly/wceno-crtw-samples
Lorelle VanFossen presents "WordPress and PHP," a quick review of how WordPress uses PHP from the core to design to WordPress Plugins. Presented originally at Clark College in Vancouver, Washington, for their PHP class, this presentation helps students understand the importance of PHP in WordPress. It also features the skill sets critical to learning WordPress from a coding and design perspective, and what it takes to become a WordPress developer and designer.
Drupal is an open source content management system (CMS) written in PHP. It is a publishing platform and used to create blog and enterprise applications. Drupal gives a strong base for organizing, structuring, creating, developing and managing web presence. Drupal has standard structure which makes it easier to access basic functionalities and source code to anyone who wants to work on it. It comes with multiple user features which allow creating multiple users and each can be assigned different roles and permission. Drupal has thousands of add-on modules and designs which enable to you to create a unique website that you desire. Its PHP based platform allows the safe and secure management of websites.
There is new slide for this at http://www.slideshare.net/catchinternet/contributing-to-wordpress-theme-review-at-wordpressorg
Guide to Start WordPress Theme Review. Useful for WordPress Theme Developers, wannabe WordPress Theme Developers and wannabe WordPress Theme Reviewer
How to Prepare a WordPress Theme for Public ReleaseDavid Yeiser
A presentation for WordCamp Louisville on how to prepare a theme for distribution. It mainly follows the theme review process outlined at WordPress.org. It also discusses reasons to release a theme and briefly highlights ways to stand out from the crowd.
Learn the basics of building WordPress themes. This presentation is appropriate for people who are somewhat familiar with PHP and databases.
To Learn More, check out http://techliminal.com
Drupal Theme Development - DrupalCon Chicago 2011Ryan Price
This class is intended for people who know some HTML and CSS, and covers the fundamental principles of Drupal theming geared toward people who wish to take a static mockup of a site design and turn it into a Drupal theme. You will also learn about using base themes, grid-based layout and helper modules to streamline and customize your Drupal theme.
Trainer Ryan Price has built entertainment sites, social networks, and eCommerce sites for clients including Popular Science, Field and Stream and Outdoor Life magazines. With over 10 years of experience building sites with PHP and other technologies, Ryan began immersing himself in Drupal around 2006. Ryan often teaches and writes articles along with Mike Anello, and the duo is also known for producing the DrupalEasy Podcast with their host Andrew Riley.
Build a WordPress theme from HTML5 template @ TelerikMario Peshev
How to build a WordPress theme out of HTML5 template, integrate dynamic components such as menus, sidebars and comment areas and use widget blocks for static sliced content.
at Telerik Academy, 19 Jun 2012
Using Curated Content in WordPress - Why and HowAdam W. Warner
Every day millions of websites, blogs and social channels create unique content that’s worth sharing – but how do you consume and share the best, most valuable and relevant content with your audience?
The answer is content curation.
In this session Adam will discuss the “why” and “how” of curating content from reputable sources, and how sharing that information in a centralized place adds value and helps to position your brand as a trusted news source for your niche.
Presentation delivered at WordCamp Raleigh on November 3, 2012. I discuss the benefits of choosing WordPress to power a non-profit website, point out special considerations and must-haves, list recommended plugins, and share resources available online to help non-profits with their websites. I draw from my experience as designer and webmaster for a house of worship and two other non-profits.
WordCamp Nashville: Clean Code for WordPressmtoppa
Slides from my talk at WordCamp Nashville, including notes. Covers why clean code is important, and provides 10 tips to make your code cleaner, for WordPress and beyond
Once you get the hang of the basics, it's time to dive in and start getting work done with git. In this session we will talk about branching strategies, staging your files, writing a good commit message and merge vs rebase. We will also touch on the topic of rewriting history - what it means, examples of doing it and when to avoid it at all costs.
John Housholder's talk on the Future of WordPress in Nashville. Talk covers WordPress growth data collected in 2012, highlights of 2012, and goals for 2013.
You are working with WordPress when you find yourself in the strange, dimly lit Cave of Community. Gradually you can make out two passageways. One curves downward to the right; the other leads upward to the left.
The choices you make in the WordPress community define your WordPress adventure. I’ll share stories of decisions and outcomes I’ve seen during my three years as a WordPress community manager.
WordCamp Rio de Janeiro 2016 - Vinícius Lourenço | Lojas Virtuais Descomplica...Vinícius Lourenço
Palestra apresentada no WordCamp Rio de Janeiro 2016. A idéia da apresentação foi abordar as facilidades da utilização de uma loja virtual usando WooCommerce, como também os benefícios ao migrar um projeto (em Magento) para WooCommerce. Relatarei também o processo de desenvolvimento no meio do caminho, alguns relatos dos clientes e as soluções desenvolvidas para as complicações que o cliente enfrentava usando a plataforma anterior.
An introduction to WordPress theme development by Thad Allender from GraphPaperPress.com. Slides from WordPress December 2010 Meetup at Fathom Creative in Washington, D.C.
In this workshop, we will show the process of taking an HTML & CSS designs and PhotoShop templates and converting them into a fully working WordPress theme. Along the way, we’ll look at the main aspects of WordPress theming, some best practices and a few tricks. WordPress 2.6 and 2.7 makes the whole process easier than ever, so get started making your WordPress site look not like a WordPress site!
Stepping into theme development can be daunting. Sure anyone with a little PHP skill and a basic understanding of the loop can create theme templates, but there are a number of things you can learn which can take your theme development to the next level. We’ll discuss the skills that can take you from a beginner theme developer to a master.
Templates are the building blocks of a WordPress theme. Every theme has one or more templates, created to display specific content on your WordPress site. In this tutorial, you'll learn all about templates in block themes and classic themes, and then take a tour through the page template of both the Twenty Twenty-Three and Twenty Twenty-One themes.
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualityInflectra
In this insightful webinar, Inflectra explores how artificial intelligence (AI) is transforming software development and testing. Discover how AI-powered tools are revolutionizing every stage of the software development lifecycle (SDLC), from design and prototyping to testing, deployment, and monitoring.
Learn about:
• The Future of Testing: How AI is shifting testing towards verification, analysis, and higher-level skills, while reducing repetitive tasks.
• Test Automation: How AI-powered test case generation, optimization, and self-healing tests are making testing more efficient and effective.
• Visual Testing: Explore the emerging capabilities of AI in visual testing and how it's set to revolutionize UI verification.
• Inflectra's AI Solutions: See demonstrations of Inflectra's cutting-edge AI tools like the ChatGPT plugin and Azure Open AI platform, designed to streamline your testing process.
Whether you're a developer, tester, or QA professional, this webinar will give you valuable insights into how AI is shaping the future of software delivery.
Let's dive deeper into the world of ODC! Ricardo Alves (OutSystems) will join us to tell all about the new Data Fabric. After that, Sezen de Bruijn (OutSystems) will get into the details on how to best design a sturdy architecture within ODC.
Connector Corner: Automate dynamic content and events by pushing a buttonDianaGray10
Here is something new! In our next Connector Corner webinar, we will demonstrate how you can use a single workflow to:
Create a campaign using Mailchimp with merge tags/fields
Send an interactive Slack channel message (using buttons)
Have the message received by managers and peers along with a test email for review
But there’s more:
In a second workflow supporting the same use case, you’ll see:
Your campaign sent to target colleagues for approval
If the “Approve” button is clicked, a Jira/Zendesk ticket is created for the marketing design team
But—if the “Reject” button is pushed, colleagues will be alerted via Slack message
Join us to learn more about this new, human-in-the-loop capability, brought to you by Integration Service connectors.
And...
Speakers:
Akshay Agnihotri, Product Manager
Charlie Greenberg, Host
Essentials of Automations: Optimizing FME Workflows with ParametersSafe Software
Are you looking to streamline your workflows and boost your projects’ efficiency? Do you find yourself searching for ways to add flexibility and control over your FME workflows? If so, you’re in the right place.
Join us for an insightful dive into the world of FME parameters, a critical element in optimizing workflow efficiency. This webinar marks the beginning of our three-part “Essentials of Automation” series. This first webinar is designed to equip you with the knowledge and skills to utilize parameters effectively: enhancing the flexibility, maintainability, and user control of your FME projects.
Here’s what you’ll gain:
- Essentials of FME Parameters: Understand the pivotal role of parameters, including Reader/Writer, Transformer, User, and FME Flow categories. Discover how they are the key to unlocking automation and optimization within your workflows.
- Practical Applications in FME Form: Delve into key user parameter types including choice, connections, and file URLs. Allow users to control how a workflow runs, making your workflows more reusable. Learn to import values and deliver the best user experience for your workflows while enhancing accuracy.
- Optimization Strategies in FME Flow: Explore the creation and strategic deployment of parameters in FME Flow, including the use of deployment and geometry parameters, to maximize workflow efficiency.
- Pro Tips for Success: Gain insights on parameterizing connections and leveraging new features like Conditional Visibility for clarity and simplicity.
We’ll wrap up with a glimpse into future webinars, followed by a Q&A session to address your specific questions surrounding this topic.
Don’t miss this opportunity to elevate your FME expertise and drive your projects to new heights of efficiency.
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Ramesh Iyer
In today's fast-changing business world, Companies that adapt and embrace new ideas often need help to keep up with the competition. However, fostering a culture of innovation takes much work. It takes vision, leadership and willingness to take risks in the right proportion. Sachin Dev Duggal, co-founder of Builder.ai, has perfected the art of this balance, creating a company culture where creativity and growth are nurtured at each stage.
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...James Anderson
Effective Application Security in Software Delivery lifecycle using Deployment Firewall and DBOM
The modern software delivery process (or the CI/CD process) includes many tools, distributed teams, open-source code, and cloud platforms. Constant focus on speed to release software to market, along with the traditional slow and manual security checks has caused gaps in continuous security as an important piece in the software supply chain. Today organizations feel more susceptible to external and internal cyber threats due to the vast attack surface in their applications supply chain and the lack of end-to-end governance and risk management.
The software team must secure its software delivery process to avoid vulnerability and security breaches. This needs to be achieved with existing tool chains and without extensive rework of the delivery processes. This talk will present strategies and techniques for providing visibility into the true risk of the existing vulnerabilities, preventing the introduction of security issues in the software, resolving vulnerabilities in production environments quickly, and capturing the deployment bill of materials (DBOM).
Speakers:
Bob Boule
Robert Boule is a technology enthusiast with PASSION for technology and making things work along with a knack for helping others understand how things work. He comes with around 20 years of solution engineering experience in application security, software continuous delivery, and SaaS platforms. He is known for his dynamic presentations in CI/CD and application security integrated in software delivery lifecycle.
Gopinath Rebala
Gopinath Rebala is the CTO of OpsMx, where he has overall responsibility for the machine learning and data processing architectures for Secure Software Delivery. Gopi also has a strong connection with our customers, leading design and architecture for strategic implementations. Gopi is a frequent speaker and well-known leader in continuous delivery and integrating security into software delivery.
Accelerate your Kubernetes clusters with Varnish CachingThijs Feryn
A presentation about the usage and availability of Varnish on Kubernetes. This talk explores the capabilities of Varnish caching and shows how to use the Varnish Helm chart to deploy it to Kubernetes.
This presentation was delivered at K8SUG Singapore. See https://feryn.eu/presentations/accelerate-your-kubernetes-clusters-with-varnish-caching-k8sug-singapore-28-2024 for more details.
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf91mobiles
91mobiles recently conducted a Smart TV Buyer Insights Survey in which we asked over 3,000 respondents about the TV they own, aspects they look at on a new TV, and their TV buying preferences.
Transcript: Selling digital books in 2024: Insights from industry leaders - T...BookNet Canada
The publishing industry has been selling digital audiobooks and ebooks for over a decade and has found its groove. What’s changed? What has stayed the same? Where do we go from here? Join a group of leading sales peers from across the industry for a conversation about the lessons learned since the popularization of digital books, best practices, digital book supply chain management, and more.
Link to video recording: https://bnctechforum.ca/sessions/selling-digital-books-in-2024-insights-from-industry-leaders/
Presented by BookNet Canada on May 28, 2024, with support from the Department of Canadian Heritage.
UiPath Test Automation using UiPath Test Suite series, part 4DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 4. In this session, we will cover Test Manager overview along with SAP heatmap.
The UiPath Test Manager overview with SAP heatmap webinar offers a concise yet comprehensive exploration of the role of a Test Manager within SAP environments, coupled with the utilization of heatmaps for effective testing strategies.
Participants will gain insights into the responsibilities, challenges, and best practices associated with test management in SAP projects. Additionally, the webinar delves into the significance of heatmaps as a visual aid for identifying testing priorities, areas of risk, and resource allocation within SAP landscapes. Through this session, attendees can expect to enhance their understanding of test management principles while learning practical approaches to optimize testing processes in SAP environments using heatmap visualization techniques
What will you get from this session?
1. Insights into SAP testing best practices
2. Heatmap utilization for testing
3. Optimization of testing processes
4. Demo
Topics covered:
Execution from the test manager
Orchestrator execution result
Defect reporting
SAP heatmap example with demo
Speaker:
Deepak Rai, Automation Practice Lead, Boundaryless Group and UiPath MVP
5. why build a theme?
• better understanding of how WordPress works
• self-sufficiency to fix or change theme aspects
• empowerment ( yourself, a career )
• move beyond the WordPress dashboard
• world domination…results may vary
7. template terminology
• template files - files that control how your site content is
displayed
• template tags - WordPress functions that grab content from
the database (get_header, get_sidebar(‘someparameter’))
• page templates - type of template that is only applied to
pages in your theme
8. • files to display your data - WordPress template files (php)
• files for theme information and styles - style.css
• files to add/remove functionality (functions.php)
• other files used can include javascript, images, svg, sass/less
and more!
theme files
10. style.css
• file header - provides details about theme in the form of
comments
• can house css styles for your site
11. style.css
/*
Theme Name: Twenty Fifteen
Theme URI: https://wordpress.org/themes/twentyfifteen/
Author: the WordPress team
Author URI: https://wordpress.org/
Description: Our 2015 default theme is clean, blog-focused, and designed for clarity. Twenty Fifteen's simple,
straightforward typography is readable on a wide variety of screen sizes, and suitable for multiple languages.
Version: 1.1
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Tags: black, blue, gray, pink, purple, white, yellow, dark, light, two-columns, left-sidebar,featured-images,
microformats, post-formats
Text Domain: twentyfifteen`
*/
24. • used to display posts, page content, comments, custom post
types, custom fields
• when you read about certain functions that list only working
in the loop, this is where it goes
• https://codex.wordpress.org/The_Loop
25. Blog Archive
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<h2><?php the_title(); ?></h2>
<?php the_post_thumbnail(); ?>
<?php the_excerpt(); ?>
<?php endwhile; else: ?>
<?php _e('Sorry, no posts matched your criteria.'); ?>
<?php endif; ?>
26. Individual Post
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<h1><?php the_title(); ?></h1>
<?php the_content(); ?>
<?php endwhile; else: ?>
<?php _e('Sorry, no pages matched your criteria.'); ?>
<?php endif; ?>
27. <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<h1><?php the_title(); ?></h1>
<?php the_content(); ?>
<?php endwhile; else: ?>
<?php _e('Sorry, no pages matched your criteria.'); ?>
<?php endif; ?>
29. template tags
• a piece of php code that tells WordPress “do” or “get” something
• they separate the theme into smaller, more understandable,
sections.
• some tags can only be used in specific areas
• values can be passed through tags to display specific content
35. • Query strings (data from page links) determine which
template or set of templates to display page content
• Templates are selected in the order determined by the
template hierarchy
• If a template file cannot be matched, index.php will be used
40. page templates
• only apply to pages
• used to change the look and feel of a page
• can be applied to a single page, page section or class of
pages
• custom pages with template names give users control by
enabling template switching
42. Custom Page Template
/**
* Template Name: Two Columns Template
*
* Description: A page template that provides a key component of WordPress as
* a CMS by meeting the need for a carefully crafted introductory page.
*
* @package WordPress
* @subpackage Twenty_Fifteen
* @since Twenty Fifteen 1.0
*/
44. folder setup
• main theme template files are in the root directory
• no required folders in themes at this time
• page-templates folder, languages folder are auto
recognized
47. functions file
• adds/removes features and functionality to your theme
• acts like a plugin
• automatically loaded for both admin and external pages
• “put it in your functions file” location
48. • enqueuing stylesheets and scripts
• enable theme features, including: sidebars, post formats,
custom headers/backgrounds
• enable options for the theme customizer
• define functions for your theme to use
• and more
54. power of hooks
• two types: actions and filters
• part of the plugin api
• gives the ability to customize, extend, and enhance
WordPress
• used heavily throughout WordPress, plugins and themes
56. filter hook info
• Use when you want to manipulate data coming from the
database to the browser, or vice versa
• Change the content by adjusting what is outputted
• Filtered content is always returned
http://codex.wordpress.org/Plugin_API/Filter_Reference
57. filter hooks
add_filter( 'the_content', 'theme_add_call_number' );
function theme_add_call_number ( $content ) {
if ( is_page() ) {
$content .= '<div>Call for more info! - 555-555-5555</div>';
}
return $content;
}
// functions.php
59. action hook info
• when queries are ran, actions (hooks in general) are
executed during the WordPress page creation life cycle.
• we can hook into when these are ran and run our own
functions
http://codex.wordpress.org/Plugin_API/Action_Reference
60. action hooks
<body>
<?php do_action ( ‘themename_before_header' ); ?>
add_action( 'themename_before_header', ‘themename_page_alert’, 5 );
function themename_page_alert() {
if ( is_front_page() ) {
echo ‘<div>Alert! We have an important message!</div>’;
}
}
// header.php
// functions.php
63. Using MAMP
• Download and install the software
- https://www.mamp.info/en/downloads/
• Setup your document root
- where your sites will be stored
• Start the Mamp Server, create database
• Install WordPress, connect database
• Profit $$$$
https://codex.wordpress.org/Installing_WordPress_Locally_on_Your_Mac_With_MAMP