Wordpress Theme Hacks Nearly Anyone Can Do Afraid you might "break something" by mucking around in your theme? With a little determination, and just a.

Slides:



Advertisements
Similar presentations
The Power Of Custom Types John Havlik
Advertisements

Deconstructing the Loop AL DAVIS WPTEACH.COM
JQuery MessageBoard. Lets use jQuery and AJAX in combination with a database to update and retrieve information without refreshing the page. Here we will.
WordPress Themes.
@beckyddesign Beckydavisdesign.com Take Control of Your Site with WordPress.
WordPress from Start to Finish Day 1: Installing and Using WordPress Looking at the WordPress database.
WEB DESIGN TABLES, PAGE LAYOUT AND FORMS. Page Layout Page Layout is an important part of web design Why do you think your page layout is important?
Creating a WordPress Website Oklahoma Conference of The UMC Department of Communications 1.
Using WordPress as a Streamlined CMS More than just a blogging platform Case study of PMCoursefinder.ch.
USING WORDPRESS. WEEK 1 1.Why WP? 2.Setting Up WP 3.Exploring the Admin screen 4.Page Organization 5.Posting 6.Polls.
WI.org Site Training Laura Peterson 3/31/2014.
NEXT. Create Pages in Blogger Another top user-requested feature has just graduated from Blogger In Draft! Blogger now makes it easy to create Pages linked.
JavaScript FaaDoOEngineers.com FaaDoOEngineers.com.
PHP Meetup - SEO 2/12/2009. Where to Focus? Ensuring the findability of content Ensuring content is well understood by search engines Maximizing the importance.
Stop Wondering… Start WORDPRESSing Rosemarie Gant Fresh Approach Web Management April 2011.
Introduction to WordPress. Learning Outcomes Describe WordPress Compare and contrast the difference between a WordPress hosted blog and a hosted blog.
WORDPRESS WEBSITE WORKSHOP Part 1: Building a Web Presence with WordPress Karen & Brad Trivers (902)
BASICS OF BLOGGING. WHAT IS A BLOG? "Blog" is an abbreviated version of "weblog," which is a term used to describe websites that maintain an ongoing chronicle.
Easy Website Creation Using WordPress Welcome and Thank You to our Sponsors.
Content Management, Working with WordPress Svetlin Nakov Telerik Corporation
WPML Translation plugin is the best option when you need to translate your Wordpress website into multiple languages. The plugin makes it easy to translate.
Νοέμβριος 2007 ΝΙΚΟΛΑΟΣ ΚΑΝΤΖΕΛΗΣ Use Worpress to create your own blog WORDPRESS 2.0.
Wordpress as a content management system Building a better website with content management systems | June 12, 2009.
Tutorial 6 Working with Web Forms
INSTALLATION OF WORDPRESS. WORDPRESS WordPress is an open source CMS, often used as a blog publishing application powered by PHP and MySQL. It has many.
Content Management, Working with WordPress Svetlin Nakov Telerik Corporation
Intro to HTML Workshop. Welcome This slideshow presentation is designed to introduce you to the basics of HTML. It is the first of three HTML workshops.
There is a certain way that an HTML file should be set up. The HTML section declares a beginning and an ending. Within the HTML, there should be a HEAD.
Tutorial 6 Working with Web Forms. XP Objectives Explore how Web forms interact with Web servers Create form elements Create field sets and legends Create.
WordPress Widgets Kathy E Gill 1 February What Are Widgets?  A “configurable code snippet" that makes it possible to modify function and appearance.
Learning Word Press. You will learn how to Get your own Get hosting for your website Get a design for your website Learn.
Jiří Balej, Martin Podborský, Petra Čačková.  Tools, which enables to produce content without source code knowledge  Text document ◦ MS Word/OO Writer.
Create Your Own Webpage. Today’s Agenda Cut & paste code Notepad++ or Notepad at home FTP Web Hosting Wordpress.
Wordpress Tutorial 22 – 24 April Table of Contents Introduction Designing blog Writing and Publishing blog Pages Posts Categories Tags Links Comments.
Bones – HTML5 Wordpress Theme Development
Chapter 9 Collecting Data with Forms. A form on a web page consists of form objects such as text boxes or radio buttons into which users type information.
Core Publisher: Station Administrator Tools. Training 1: Site Administration Training 2: Programs Training 3: Content Tagging Training 4: Creating Posts.
CIT 256 Organizing Large Websites: Divs, DW Templates Dr. Beryl Hoffman.
WordPress Web. WordPress Blogging system with full content management Personal publishing system Built on PHP scripting language and MySQL relational.
Advanced Level Course. Site Extras Site Extras consist of four categories: Stationeries Site Trash Designs Components.
SEG3210 DHTML Tutorial. DHTML DHTML is a combination of technologies used to create dynamic and interactive Web sites. –HTML - For creating text and image.
Google Analytics for Small Business Presented by: Keidra Chaney.
WORDPRESS TECHNOLOGY BY AMEER. WELCOME INTRODUCTION WordPress is an Open Source software system used by millions of people around the world to create.
INTRODUCTION TO HTML5 Semantic Layout in HTML5.  The new semantic layout in HTML5 refers to a new class of elements that is designed to help you understand.
 Whether using paper forms or forms on the web, forms are used for gathering information. User enter information into designated areas, or fields. Forms.
Mary Immaculate College 9 th Nov. Objectives Participants will be enabled to: Create and maintain your school’s website using Scoilnet Blogs Add other.
 HTML is hypertext markup language. It is a way for people to display their information with more complex pictures and text displays. Before HTML, messages.
USING WORDPRESS TO CREATE A WEBSITE (RATHER THAN A BLOG) STEP-BY-STEP INSTRUCTIONS.
Dwayne Forrester Next  A blog is a discussion or informational site published on the World Wide Web and consisting of discrete entries ("posts") typically.
Tutorial 6 Working with Web Forms. XP Objectives Explore how Web forms interact with Web servers Create form elements Create field sets and legends Create.
Tutorial 6 Working with Web Forms. 2New Perspectives on HTML, XHTML, and XML, Comprehensive, 3rd Edition Objectives Explore how Web forms interact with.
Core Publisher: Station Administrator Tools. Training 1: Site Administration Training 2: Programs Training 3: Content Tagging Training 4: Creating Posts.
Videos, the More Tag, Permalinks, and Shortlinks.
USING WORDPRESS TO CREATE A WEBSITE (RATHER THAN A BLOG) STEP-BY-STEP INSTRUCTIONS.
12/14/20151 Uniquescriptz Backend Support Document Ver 2.0.
Migrating Sites to Wordpress GRC OCIO Wordpress Workshop 11/17/2014.
Tutorial 6 Working with Web Forms. 2New Perspectives on HTML, XHTML, and XML, Comprehensive, 3rd Edition Objectives Explore how Web forms interact with.
Advanced Web 2012 Lecture 11 Sean Costain 2012.
Blogging. Website and blog A website, also written as web site,or simply site, is a set of related web pages typically served from a single web domain.
WordPress for Beginners February 2, 2014 Facebook.
+ Publishing Your First Post USING WORDPRESS. + A CMS (content management system) is an application that allows you to publish, edit, modify, organize,
Easy WP Guide V2.6 for WordPress 3.8. easywpguide.com Adding Tags within your Post Adding Tags whilst editing your Post, will automatically assign those.
Computer Skills (1) Internet Explorer. To open the Internet Explorer: –Double click on the Internet Explorer icon on Desktop. –Or, from Start  All Programs.
CREATE, IMPLEMENT AND ENJOY! Blogs,Wikis & RSS Readers.
HTML Tutorial. What is HTML HTML is a markup language for describing web documents (web pages) HTML documents are described by HTML tags Each HTML tag.
 A Javascript library designed to simplify client-side scripting of HTML.
HOW TO SET UP A WEBSITE. Why use WordPress? Nearly half of the websites on the Internet are running on the WordPress website platform It’s totally free.
Intro to WordPress (Using XAMPP)
Easy Website Creation Using WordPress
Wordpress test.cs.edinboro.edu.
Presentation transcript:

Wordpress Theme Hacks Nearly Anyone Can Do Afraid you might "break something" by mucking around in your theme? With a little determination, and just a few keystrokes - you'd be surprised how many things you can change on your own.

How I Met Wordpress THIS WAS ME For 10 LONG YEARS

In 1999 I was hired as a webmaster I was VERY loyal

Webmasters Did Everything HTML Javascript Graphics Technical Writing CGI/Perl Coding UNIX Shell Coding Create Online Tools Training

Open Source CMS I tried to introduce multiple Open Source CMS Systems to Automate my Job

Big Money Always Won

I Met Wordpress in 2004

I Thought They Were Wrong... So I kept using Wordpress on My Own... Sometimes instead of doing my real work.

Little Did I Know... In 2009 they outsourced the last of us... the last of the webmasters that is.

I Was Out of Work No Jobs. Unemployment. Couldn't Move. What Now?

Reinvention

Wordpress Theme Hacks Nearly Anyone Can Do You Will Need to: Use the Wordpress dashboard editor Know basic HTML Be able to Edit, Copy and Paste small amounts of PHP Code

Why Hack a Wordpress Theme? To stand out or look different create a look nobody else has To add functionality for the end user like, tweet, disqus To enhance the way content is displayed post meta, text, images, the_loop, navigation To customize specific pages search results, 404 Pages, archives, category & tags pages To show content only when conditions are met only on the home page, just singles posts, only tag pages, etc.

How Do I Edit My WP Theme? In WP dashboard: Appearance Editor Click on the page you want to edit:

What Are All Those Theme Pages? At Bare Minimum, Most WP Themes Have: index.php (home page + a whole lot more) single.php (single posts) page.php (paged pages – like your about page) comments.php (the comments block after content) header.php (before the content on EVERY page) footer.php (after the content on EVERY page) sidebar.php (what's in the sidebar) functions.php (special theme specific PHP code) style.css (text formatting and layout rules) Reference:

Which file does what? A page file (index, single, page) calls and loads other files for specific page content areas:

How Many Pages Could My WP Theme Have? The Bare Minimum index.php single.php page.php comments.php header.php footer.php functions.php sidebar.php style.css Optional Theme Pages archive.php (date based archives) search.php (search results) category.php (category pages) tag.php (tag pages) 404.php (not found errors) attachment.php (attachments) author.php (author page) loop.php (Wordpress 3.0+) Countless custom template files

Why Use Conditional Tags To do something only when certain conditions are met Examples: Show specific text or images Create custom adverts for specific uses Designate alternate layouts for certain pages Using plugins to do this slows down your site

Where can I use Conditional Tags? Conditions such as is_home with is_front_page, is_single, is_sticky, is_page, is_page_template, is_category, is_tag, is_author, work great in sections such as: index.php Header or Footer Sidebars the_loop Comments block

Very Specific Conditions Specify individual pages like is_single('hello') or in_category('5'), is_page_template('contact.php'), is_tag('ipod') or has_tag('ipod'), is_author('john-pratt'), is_date(), is_single(array('my-best-post', 'my-worst-post')) Specific category and tag pages Specific template pages Specific archive pages Specific post ID's Reference the Codex:

Hacking with Conditional Tags Do ABC when XYZ Condition is met: Show my big block of SEO keyword-laden text By replacing is_home with is_front_page, is_single, is_sticky, is_page, is_page_template, is_category, is_tag, is_author, is_date, is_archive, or is_attachment to make your message show up on nearly any WordPress page.

Having Multiple Conditions Do ABC when XYZ Condition is met, elseif single post page do DEF Show my home page text block Show my single post text block instead In this example we show custom text for the home page, or on single pages. If neither condition is met – we don't show any custom text.

Multiple Conditions Else Default Do ABC when XYZ Condition is met, elseif single post page do DEF, else show do default for all other instances Show my home page text block Show my single post text block instead Show my default text for all other conditions

Using Multiple Conditions Combine conditions on one statement to show the same thing in multiple places. Show this text for all those conditions The double-pipe or || in the code signifies OR, so WordPress knows, if this is home, or a single page, or a category page, or a page page, or an archive page – show the same thing for all.

Show Everywhere, Except... Use the concept in reverse to show everywhere except where you don't want it... <?php if (is_home()) { } Else { ?> Show this everywhere! In this example we show nothing when the home page is shown, else show it every other time.

Conditionally Use WP Functions Use a Conditional tag to force a WP Function <? php if (is_home()) { wp_list_bookmarks(); } ?> Use conditional statements to do things like get_tags, get_category_parents, get_page_children, get_user_meta, and many more... Reference:

Hacking Your Comments Plugins like subscribe to comments or CommentLuv are great enhancements By modifying the text in comments.php, you can customize what your comments block says (or how it looks) By modifying some of the code, you can add (or remove functionality) Get rid of comment spam at the source

Add Delete and Spam Links to Your Comment Sections Add this code to your theme's functions.php file: function delete_comment_link($id) { if (current_user_can('edit_post')) { echo '| del '; echo '| spam '; } } Add this code to your comments.php where you want the links (usually add it in where you find edit_comment_link()): delete_comment_link(get_comment_ID()); Source: your-commentshttp:// your-comments

Stop HTML Links in Comments Add this to your functions.php file, all links will be stripped: function plc_comment_post( $incoming_comment ) { $incoming_comment['comment_content'] = htmlspecialchars($incoming_comment['comment_content']); $incoming_comment['comment_content'] = str_replace( "'", '&apos;', $incoming_comment['comment_content'] ); return( $incoming_comment ); } function plc_comment_display( $comment_to_display ) { $comment_to_display = str_replace( '&apos;', "'", $comment_to_display ); return $comment_to_display; } add_filter('preprocess_comment', 'plc_comment_post', '', 1); add_filter('comment_text', 'plc_comment_display', '', 1); add_filter('comment_text_rss', 'plc_comment_display', '', 1); add_filter('comment_excerpt', 'plc_comment_display', '', 1); Reference:

Prevent Most Comment Spam Most Spammers use software or scripts that have no referrer. Require all comments come from a web browser to stop the spammers dead! Add this to your functions.php file: function check_referrer() { if (!isset($_SERVER['HTTP_REFERER']) || $_SERVER['HTTP_REFERER'] == ) { wp_die( __('enable referrers or go away') ); } } add_action('check_comment_flood', 'check_referrer'); Source: comments-hacks/ comments-hacks/

Hacking Navigation Add things to your blog that will make it more usable and help readers find what they need Breadcrumb Plugins Related Posts Plugins Most Viewed / Popular Post Plugins Category Icons Plugins

Remove Next / Previous Links Replace with more common pagination links WP-Page Numbers Plugin WP-PageNavi Plugin

Q&A Find me: facebook.com/jtprattmedia twitter.com/jtpratt wp-dir.com