Advanced Thesis Techniques and Tricks

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

0 comments

Post a comment

    Post a comment
    Embed Video
    Edit your comment Cancel

    5 Favorites

    Advanced Thesis Techniques and Tricks - Presentation Transcript

    1. Advanced Thesis Techniques and Tricks Brad Williams WebDevStudios.com
    2. 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
    3. 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:
    4. What is a Hook?
    5. What is a Hook?
    6. 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()
    7. 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
    8. 48 Hooks (In case you were counting)
    9. Example 1: Hello WordCamp <?php add_action('hook_name', ‘hello_wordcamp'); Function hello_wordcamp() { echo “Hello WordCamp!”; } ?>
    10. 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>“; } ?>
    11. Now for the fun stuff
    12. 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
    13. Example 4: Add A Secondary Menu Thesis by default has a single menu So lets create a secondary menu!
    14. 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'); ?>
    15. 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
    16. Example 4: Add A Secondary Menu BAM! Another menu! Ref: http://www.emptycabinmedia.com/thesis-theme-add-another-menu/
    17. Example 5: Widgetize your Multimedia Box
    18. 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'); ?>
    19. Example 5: Widgetize your Multimedia Box Change the Multimedia Box setting to Custom code Add any widgets you want to the Multimedia Box sidebar
    20. Example 5: Widgetize your Multimedia Box Now we are widgetized! Ref: http://rickbeckman.org/widgetizing-thesis-multimedia-box/
    21. 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
    22. Brad Williams [email_address] Blog: strangework.com twitter.com/williamsba IRC: WDS-Brad Everywhere else: williamsba Contact

    + Brad WilliamsBrad Williams, 6 months ago

    custom

    2708 views, 5 favs, 3 embeds more stats

    My presentation at WordCamp Mid-Atlantic on Advance more

    More info about this document

    © All Rights Reserved

    Go to text version

    • Total Views 2708
      • 2634 on SlideShare
      • 74 from embeds
    • Comments 0
    • Favorites 5
    • Downloads 24
    Most viewed embeds
    • 44 views on http://www.strangework.com
    • 27 views on http://webdevstudios.com
    • 3 views on http://drop.io

    more

    All embeds
    • 44 views on http://www.strangework.com
    • 27 views on http://webdevstudios.com
    • 3 views on http://drop.io

    less

    Flagged as inappropriate Flag as inappropriate
    Flag as inappropriate

    Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

    Cancel
    File a copyright complaint
    Having problems? Go to our helpdesk?

    Categories