Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Land of Confusion - or, How I Learned to Stop Worrying and Love Genesis

Land of Confusion - or, How I Learned to Stop Worrying and Love Genesis

This is the presentation I did for WCLAX 2015.

Robert Gillmer

September 27, 2015
Tweet

Other Decks in Programming

Transcript

  1. #WCLAX #LandOfConfusion @RobertFGillmer wclax.reviews Genesis Framework Think of Genesis as

    a parent theme. Several different companies release child themes for Genesis - StudioPress, Web Savvy Studios, and others.
  2. #WCLAX #LandOfConfusion @RobertFGillmer wclax.reviews More Than One Child Theme StudioPress

    has 33* Genesis child themes available. Web Savvy Marketing has 37 themes. Genesis has a “recommended developer” list - there are 24 devs on the list, with 100+ themes.
  3. #WCLAX #LandOfConfusion @RobertFGillmer wclax.reviews Variety in Child Themes When you

    create a child theme for a regular template - TwentyFifteen, for instance - the child looks exactly like the parent, until you start making modifications. Genesis child themes look vastly different from the parent, and from each other.
  4. #WCLAX #LandOfConfusion @RobertFGillmer wclax.reviews Standard Themes <article id="post-<?php the_ID(); ?>"

    <?php post_class(); ?>> <header class="entry-header"> <?php the_post_thumbnail(); ?> <h1 class="entry-title"><?php the_title(); ?></h1> </header> <div class="entry-content"> <?php the_content(); ?> </div> <footer class="entry-meta"> <?php edit_post_link( … ); ?> </footer> </article>
  5. #WCLAX #LandOfConfusion @RobertFGillmer wclax.reviews Genesis Themes <?php function rfg_demo_page() {

    $out = ' '; $out .= '<header class="entry-header">'; $out .= get_the_post_thumbnail(); $out .= '<h1 class="entry-title">'; $out .= get_the_title(); $out .= ‘</h1>’; $out .= '</header>’; echo $out; }
  6. #WCLAX #LandOfConfusion @RobertFGillmer wclax.reviews Standard themes are usually written with

    a foundation of HTML, calling PHP when needed. The Genesis theme and its child themes are written with a foundation of PHP.
  7. #WCLAX #LandOfConfusion @RobertFGillmer wclax.reviews Genesis Themes function rfg_add_author_byline() { echo

    '<h2>By ' . get_the_author() . '</h2>'; } Four more lines. 150 more bytes. add_action( 'genesis_entry_header', 'rfg_add_author_byline' );
  8. #WCLAX #LandOfConfusion @RobertFGillmer wclax.reviews Case Studies Adding a "byline" after

    the title of a single Post Changing the title of a single Post to use H2 tags instead of H1 tags
  9. #WCLAX #LandOfConfusion @RobertFGillmer wclax.reviews Genesis Themes Five more lines. 214

    more bytes. add_action( 'genesis_entry_header', 'rfg_change_title_markup' ); remove_action( 'genesis_entry_header', 'genesis_do_post_title' ); function rfg_change_title_markup() { echo '<h2>' . get_the_title() . '</h2>'; }
  10. #WCLAX #LandOfConfusion @RobertFGillmer wclax.reviews John Hawkins put together a great

    list of the functions which you can use to remove the built-in Genesis functions. http://wpvegas.com/wp-content/uploads/ 2014/02/genesis-removes.txt
  11. #WCLAX #LandOfConfusion @RobertFGillmer wclax.reviews Case Studies Adding a "byline" after

    the title of a single Post Changing the title of a single Post to use H2 tags instead of H1 tags Removing the title of a single Post entirely
  12. #WCLAX #LandOfConfusion @RobertFGillmer wclax.reviews Genesis Themes One more line. 65

    more bytes. remove_action( 'genesis_entry_header', 'genesis_do_post_title' );
  13. #WCLAX #LandOfConfusion @RobertFGillmer wclax.reviews Case Study Breakdowns Standard Themes Genesis

    Themes Adding a Byline Changing H1 to H2 Removing the title One more line. 34 more bytes. Zero more lines. Zero more bytes. One less line. 30 less bytes. Four more lines. 150 more bytes. Five more lines. 214 more bytes. One more line. 65 more bytes.
  14. #WCLAX #LandOfConfusion @RobertFGillmer wclax.reviews single.php Breakdowns Standard Themes Genesis Themes

    Twenty Fourteen 40 lines. 1033 bytes. Twenty Thirteen 28 lines. 600 bytes. Twenty Fifteen 48 lines. 1528 bytes.
  15. #WCLAX #LandOfConfusion @RobertFGillmer wclax.reviews single.php Breakdowns AgencyPress 2 lines. 16

    bytes. News Theme 2 lines. 16 bytes. Enterprise 2 lines. 16 bytes. Standard Themes Genesis Themes Twenty Fourteen 40 lines. 1033 bytes. Twenty Thirteen 28 lines. 600 bytes. Twenty Fifteen 48 lines. 1528 bytes.
  16. #WCLAX #LandOfConfusion @RobertFGillmer wclax.reviews Pros for Genesis Skill set -

    Better for programmers who are used to functions and PHP. Marketability - Developers can brag that they know the Genesis framework. Variety - Hundreds of child theme to choose from. Continuity - Snippets which work on one child theme will likely work on any other theme. Reliability - The Genesis themes are built better than themes you’d find on other theme sites. Community - There are many resources that can help you - websites, videos and podcasts, and other developers.
  17. #WCLAX #LandOfConfusion @RobertFGillmer wclax.reviews Cons for Genesis Skill set -

    Worse for people who are better at HTML markup vs. PHP. Learning curve - One more set of functions, hooks, etc. to learn. New technologies - Genesis took a while to be mobile ready. Also, there are no StudioPress themes with SASS partials. Design similarity - There’s a certain “sameness” to many of the Genesis themes.
  18. #WCLAX #LandOfConfusion @RobertFGillmer wclax.reviews Final Request There's a great plugin

    which allows you to enter code snippets through the back-end, rather than by editing files. It's called Genesis Simple Hooks, http:// wordpress.org/plugins/genesis-simple- hooks/.
  19. #WCLAX #LandOfConfusion @RobertFGillmer wclax.reviews Final Request It's perfectly okay to

    use this plugin to make your code changes and modifications to your site. It's also perfectly okay to make the changes directly to the PHP. It is NOT okay to do both. It makes baby Jesus weep. (Or at least it makes other developers weep.)