Lego2012
1/26/2017 - 2:43 PM

My function that does stuff conditionally

My function that does stuff conditionally

<?php

// Use this if working with Genesis
//add_action( 'genesis_before', 'my_function_that_does_stuff' );

// Use this if working with BB Theme
//add_action( 'fl_body_open', 'my_function_that_does_stuff' );

function my_function_that_does_stuff() {

  if( is_page() ) {

    echo 'Hello Page!';

  } elseif( is_single() ) {

    echo 'Hello Post!';

  } else {

    echo 'Hello World!';

  }

}