• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Advanced Thesis Techniques and Tricks
 

Advanced Thesis Techniques and Tricks

on

  • 13,352 views

My presentation at WordCamp Mid-Atlantic on Advanced Thesis Techniques and Tricks

My presentation at WordCamp Mid-Atlantic on Advanced Thesis Techniques and Tricks

Statistics

Views

Total Views
13,352
Views on SlideShare
13,079
Embed Views
273

Actions

Likes
7
Downloads
91
Comments
0

7 Embeds 273

http://www.strangework.com 120
http://www.slideshare.net 86
http://webdevstudios.com 51
http://strangework.com 8
http://www.goija.com 4
http://drop.io 3
http://translate.googleusercontent.com 1
More...

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel

Advanced Thesis Techniques and Tricks Advanced Thesis Techniques and Tricks Presentation Transcript

  • Advanced Thesis Techniques and Tricks Brad Williams WebDevStudios.com
  • Brad Williams CEO & Co-Founder, WebDevStudios.com Co-Host SitePoint Podcast Organizer NJ WordPress Meetup Who Am I? Recent Thesis Sites: AwayToGarden.com (WPMU) LoomisCreek.com TheSisterProject.com (WPMU) MattBites.com RetroRenovation.com
    • What is Thesis?
    • What is a Hook
    • Custom Page Templates
    • Adding a Secondary Menu
    • Widetize your Multimedia Box
    • And more!
    Topics
  • What is Thesis?
    • Search Engine Optimization (SEO)
    • Accessibility
    • Usability
    • Flexibility
    Thesis is a Premium Theme Framework with a focus on… Thesis was created by this guy: Chris Pearson
    • Matt Cutts - http://www.dullest.com/blog/
    • Chris Brogan - http://www.chrisbrogan.com/
    • Copy Blogger - http://www.copyblogger.com/
    • Danny Sullivan - http://daggle.com/
    • Laughing Squid - http://laughingsquid.com/
    • Cute Overload - http://cuteoverload.com/
    • Technosailor - http://technosailor.com/
    • Etc, etc, etc
    Who uses Thesis?
    • Custom_functions.php – location for all custom code, hooks, functions, etc
    • Custom.css – location for all custom style elements on your website
    Thesis customization is powered by two files
    • wp-content/themes/thesis/custom/
    • custom_functions.php
    • custom.css
    Location:
  • What is a Hook?
  • What is a Hook?
  • Thesis features a simple hook system that is essentially an API—a set of basic commands that you can use to add to, subtract from, and modify the functionality of your Thesis installation. Two step process: 1. construct a simple function to house your custom code 2. Tell Thesis where to place your custom code by specifying the appropriate hook You can add and remove any functions using add_action() and remove_action()
  • Available Thesis Hooks thesis_hook_before_html thesis_hook_after_html thesis_hook_before_header thesis_hook_after_header thesis_hook_header thesis_hook_before_title thesis_hook_after_title thesis_hook_before_content_box thesis_hook_after_content_box thesis_hook_before_content thesis_hook_after_content thesis_hook_feature_box thesis_hook_before_post_box thesis_hook_after_post_box thesis_hook_before_teasers_box thesis_hook_after_teasers_box thesis_hook_before_post thesis_hook_after_post thesis_hook_before_teaser_box thesis_hook_after_teaser_box thesis_hook_before_teaser thesis_hook_after_teaser thesis_hook_before_headline thesis_hook_after_headline thesis_hook_before_teaser_headline thesis_hook_after_teaser_headline thesis_hook_byline_item thesis_hook_before_comment_meta thesis_hook_after_comment_meta thesis_hook_after_comment thesis_hook_comment_form thesis_hook_archives_template thesis_hook_custom_template thesis_hook_faux_admin thesis_hook_archive_info thesis_hook_404_title thesis_hook_404_content thesis_hook_before_sidebars thesis_hook_after_sidebars thesis_hook_multimedia_box thesis_hook_after_multimedia_box thesis_hook_before_sidebar_1 thesis_hook_after_sidebar_1 thesis_hook_before_sidebar_2 thesis_hook_after_sidebar_2 thesis_hook_before_footer thesis_hook_after_footer thesis_hook_footer
  • 48 Hooks (In case you were counting)
  • Example 1: Hello WordCamp <?php add_action('hook_name', ‘hello_wordcamp'); Function hello_wordcamp() { echo “Hello WordCamp!”; } ?>
  • Example 2: Custom Footer <?php remove_action('thesis_hook_footer', 'thesis_attribution'); add_action('thesis_hook_footer', 'my_footer'); function my_footer() {     echo “<p>Copyright &copy; WebDevStudios.com</p>“; } ?>
  • Now for the fun stuff
  • Example 3: Custom Page Template <?php remove_action('thesis_hook_custom_template', 'thesis_custom_template_sample'); add_action('thesis_hook_custom_template', 'home_custom'); ?> Remember to set the page template to Custom Template
  • Example 4: Add A Secondary Menu Thesis by default has a single menu So lets create a secondary menu!
  • Example 4: Add A Secondary Menu <?php function topnav_menu() { ?> <ul id=&quot;topnav&quot;> <li><a href=“/wordpress&quot;>WordPress</a></li> <li><a href=“/wpmu&quot;>WPMU</a></li> <li><a href=“/buddypress”>BuddyPress</a></li> <li><a href=“/bbpress&quot;>bbPress</a></li> </ul> <?php } add_action('thesis_hook_before_header', 'topnav_menu'); ?>
  • Example 4: Add A Secondary Menu /* Top Nav bar */ .custom ul#topnav { border-style: none; list-style-image: none; list-style-position: outside; list-style-type: none; background:#E4E4E4 none repeat scroll 0 0; width: 100%; float: left; } .custom ul#topnav li { float: left; padding: 3px 10px 3px 0px; } .custom ul#topnav li a { font-size: 1.1em; color: #000000; } .custom ul#topnav li a:hover { text-decoration: underline; } Add a little styling in custom.css
  • Example 4: Add A Secondary Menu BAM! Another menu! Ref: http://www.emptycabinmedia.com/thesis-theme-add-another-menu/
  • Example 5: Widgetize your Multimedia Box
  • Example 5: Widgetize your Multimedia Box <?php register_sidebar(array('name' => 'Multimedia Box', 'before_widget' => '<li class=&quot;widget %2$s&quot;>', 'after_widget' => '</li>', 'before_title' => '<h3>', 'after_title' => '</h3>')); function multimedia_box_widgets() { echo '<ul class=&quot;sidebar_list&quot;>'; dynamic_sidebar('Multimedia Box'); echo '</ul>'; } add_action('thesis_hook_multimedia_box', 'multimedia_box_widgets'); ?>
  • Example 5: Widgetize your Multimedia Box Change the Multimedia Box setting to Custom code Add any widgets you want to the Multimedia Box sidebar
  • Example 5: Widgetize your Multimedia Box Now we are widgetized! Ref: http://rickbeckman.org/widgetizing-thesis-multimedia-box/
  • And there is no more, I lied In Summary, Thesis is a great theme for beginner and advanced users alike.
    • Thesis Official Website – http://diythemes.com/thesis/
    • Thesis Theme User’s Guide
      • http://diythemes.com/thesis/rtfm/
    • Thesis Hook References
      • http://diythemes.com/thesis/rtfm/hooks/
      • http://diythemes.com/thesis/rtfm/default-hook-usage/
    • Thesis Pro Users
      • Chris Pearson http://www.pearsonified.com/
      • Rick Beckman (KingdomGeek) http://rickbeckman.org/
      • Kristarella http://www.kristarella.com/
    • Thesis Resource Sites
      • http://thesisthemehq.com/
      • http://thesisgallery.com/
    Thesis Resources
  • Brad Williams [email_address] Blog: strangework.com twitter.com/williamsba IRC: WDS-Brad Everywhere else: williamsba Contact