• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Unique Footer on Homepage – HTML5

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › Design Tips and Tricks › Unique Footer on Homepage – HTML5

This topic is: not resolved

Tagged: footer

  • This topic has 4 replies, 2 voices, and was last updated 11 years, 8 months ago by LJ.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • November 11, 2013 at 12:18 pm #72334
    LJ
    Member

    Hoping someone can help with this. I'm using Lifestyle Pro and would like to have a unique footer on the homepage.

    I'm using the following from the tutorials but would like to know what to add so that I end up with 2 separate footers - one for front_page and one for all the others.

    //* Customize the entire footer
    remove_action( 'genesis_footer', 'genesis_do_footer' );
    add_action( 'genesis_footer', 'sp_custom_footer' );
    function sp_custom_footer() {
    ?>
    <p>&copy; Copyright 2012 <a href="http://mydomain.com/">My Domain</a> &middot; All Rights Reserved &middot; Powered by <a href="http://wordpress.org/">WordPress</a> &middot; <a href="http://mydomain.com/wp-admin">Admin</a></p>
    <?php
    }

    I had found this post and half way down he shows how to do what I'm trying to achieve, but it appears that's not for HTML5. I did try to cobble something together but nothing works.

    Any direction would be much appreciated!

    November 11, 2013 at 3:24 pm #72359
    nutsandbolts
    Member

    The tutorial had a typo - try this:

    /** Customize the footer */
    remove_action( 'genesis_footer', 'genesis_do_footer' );
    remove_action( 'genesis_footer', 'genesis_footer_markup_open', 5);
    remove_action( 'genesis_footer', 'genesis_footer_markup_close', 15);
    function child_custom_footer() { 
     
      if(is_front_page()) {?>
     
        <footer>
            <p>&copy; Copyright 2012 <a href="http://mydomain.com/">My Domain</a> &middot; All Rights Reserved &middot; Powered by <a href="http://wordpress.org/">WordPress</a> &middot; <a href="http://mydomain.com/wp-admin">Admin</a></p>
    <?php
        </footer>
        
      <?php }
     
      elseif (!is_front_page()) {?>
     
        <footer>
            <p>&copy; Copyright 2012 <a href="http://mydomain.com/">My Domain</a> &middot; All Rights Reserved &middot; Powered by <a href="http://wordpress.org/">WordPress</a> &middot; <a href="http://mydomain.com/wp-admin">Admin</a></p>
        </footer>
     
      <?php }
    }
    add_action( 'genesis_footer', 'child_custom_footer' ); 

    If that doesn't work, let me know and I'll take a closer look at it.


    Andrea Whitmer, Owner/Developer, Nuts and Bolts Media
    I provide development and training services for designers • Find me on Twitter and Google+

    November 11, 2013 at 4:55 pm #72383
    LJ
    Member

    Thanks! Gave it a try and still getting a parse error.

    Here is the complete functions.php:

    <?php
    //* Start the engine
    include_once( get_template_directory() . '/lib/init.php' );
    
    //* Set Localization (do not remove)
    load_child_theme_textdomain( 'lifestyle', apply_filters( 'child_theme_textdomain', get_stylesheet_directory() . '/languages', 'lifestyle' ) );
    
    //* Child theme (do not remove)
    define( 'CHILD_THEME_NAME', __( 'Lifestyle Pro Theme', 'lifestyle' ) );
    define( 'CHILD_THEME_URL', 'http://my.studiopress.com/themes/lifestyle/' );
    define( 'CHILD_THEME_VERSION', '3.0.0' );
    
    //* Add HTML5 markup structure
    add_theme_support( 'html5' );
    
    //* Add viewport meta tag for mobile browsers
    add_theme_support( 'genesis-responsive-viewport' );
    
    //* Enqueue Droid Sans and Roboto Slab Google fonts
    add_action( 'wp_enqueue_scripts', 'lifestyle_google_fonts' );
    function lifestyle_google_fonts() {
    
    	wp_enqueue_style( 'google-fonts', '//fonts.googleapis.com/css?family=Droid+Sans:400,700|Roboto+Slab:400,300,700', array(), CHILD_THEME_VERSION );
    	
    }
    
    //* Add new image sizes
    add_image_size( 'home-large', 634, 360, TRUE );
    add_image_size( 'home-small', 266, 160, TRUE );
    
    //* Add support for custom background
    add_theme_support( 'custom-background', array(
    	'default-image' => get_stylesheet_directory_uri() . '/images/bg.png',
    	'default-color' => 'efefe9',
    ) );
    
    //* Add support for custom header
    add_theme_support( 'custom-header', array(
    	'header_image'    => '',
    	'header-selector' => '.site-title a',
    	'header-text'     => false,
    	'height'          => 324,
    	'width'           => 1140,
    ) );
    
    //* Add support for additional color style options
    add_theme_support( 'genesis-style-selector', array(
    	'lifestyle-pro-blue'    => __( 'Lifestyle Pro Blue', 'lifestyle' ),
    	'lifestyle-pro-green'   => __( 'Lifestyle Pro Green', 'lifestyle' ),
    	'lifestyle-pro-mustard' => __( 'Lifestyle Pro Mustard', 'lifestyle' ),
    	'lifestyle-pro-purple'  => __( 'Lifestyle Pro Purple', 'lifestyle' ),
    	'lifestyle-pro-red'     => __( 'Lifestyle Pro Red', 'lifestyle' ),
    ) );
    
    //* Add support for 3-column footer widgets
    add_theme_support( 'genesis-footer-widgets', 3 );
    
    //* Reposition the primary navigation
    remove_action( 'genesis_after_header', 'genesis_do_nav' );
    add_action( 'genesis_before_header', 'genesis_do_nav' );
    
    //* Modify the size of the Gravatar in the author box
    add_filter( 'genesis_author_box_gravatar_size', 'lifestyle_author_box_gravatar' );
    function lifestyle_author_box_gravatar( $size ) {
    
    	return 96;
    		
    }
    
    //* Modify the size of the Gravatar in the entry comments
    add_filter( 'genesis_comment_list_args', 'lifestyle_comments_gravatar' );
    function lifestyle_comments_gravatar( $args ) {
    
    	$args['avatar_size'] = 60;
    	return $args;
    	
    }
    
    //* Register widget areas
    genesis_register_sidebar( array(
    	'id'          => 'home-top',
    	'name'        => __( 'Home - Top', 'lifestyle' ),
    	'description' => __( 'This is the top section of the homepage.', 'lifestyle' ),
    ) );
    genesis_register_sidebar( array(
    	'id'          => 'home-middle',
    	'name'        => __( 'Home - Middle', 'lifestyle' ),
    	'description' => __( 'This is the middle section of the homepage.', 'lifestyle' ),
    ) );
    genesis_register_sidebar( array(
    	'id'          => 'home-bottom-left',
    	'name'        => __( 'Home - Bottom Left', 'lifestyle' ),
    	'description' => __( 'This is the bottom left section of the homepage.', 'lifestyle' ),
    ) );
    genesis_register_sidebar( array(
    	'id'          => 'home-bottom-right',
    	'name'        => __( 'Home - Bottom Right', 'lifestyle' ),
    	'description' => __( 'This is the bottom right section of the homepage.', 'lifestyle' ),
    ) );
    
    /** Customize the footer */
    remove_action( 'genesis_footer', 'genesis_do_footer' );
    remove_action( 'genesis_footer', 'genesis_footer_markup_open', 5);
    remove_action( 'genesis_footer', 'genesis_footer_markup_close', 15);
    function child_custom_footer() { 
     
      if(is_front_page()) {?>
     
        <footer>
            <p>&copy; Copyright 2012 <a href="http://mydomain.com/">My Domain Test 1</a> &middot; All Rights Reserved &middot; Powered by <a href="http://wordpress.org/">WordPress</a> &middot; <a href="http://mydomain.com/wp-admin">Admin</a></p>
    <?php
        </footer>
        
      <?php }
     
      elseif (!is_front_page()) {?>
     
        <footer>
            <p>&copy; Copyright 2012 <a href="http://mydomain.com/">My Domain Test 2</a> &middot; All Rights Reserved &middot; Powered by <a href="http://wordpress.org/">WordPress</a> &middot; <a href="http://mydomain.com/wp-admin">Admin</a></p>
        </footer>
     
      <?php }
    }
    add_action( 'genesis_footer', 'child_custom_footer' ); 

    and here is the error: ...

    Parse error: syntax error, unexpected '<' in /home/***/public_html/worksite1/wp-content/themes/***/functions.php on line 113

    November 11, 2013 at 5:05 pm #72386
    nutsandbolts
    Member

    Okay, I've got this one working on a test site:

    // Customize footer text with special text for homepage
    add_filter('genesis_footer_output', 'footer_output_filter', 10, 3);
    function footer_output_filter( $output, $creds_text ) {  
      if(is_front_page()) {
        $creds_text = '<p>Copyright [footer_copyright] <a href="http://mydomain.com/">My Domain Test 1</a> &middot; All Rights Reserved &middot; Powered by <a href="http://wordpress.org/">WordPress</a> &middot; <a href="http://mydomain.com/wp-admin">Admin</a></p>';
        $output = '</div>' . '<div class="creds">' . $creds_text . '</div>';
          return $output;
      }
      
      elseif (!is_front_page()) {
        $creds_text = '<p>Copyright [footer_copyright] <a href="http://mydomain.com/">My Domain Test 2</a> &middot; All Rights Reserved &middot; Powered by <a href="http://wordpress.org/">WordPress</a> &middot; <a href="http://mydomain.com/wp-admin">Admin</a></p>';
        $output = '</div>' . '<div class="creds">' . $creds_text . '</div>';
          return $output;
      }
    }

    Andrea Whitmer, Owner/Developer, Nuts and Bolts Media
    I provide development and training services for designers • Find me on Twitter and Google+

    November 11, 2013 at 5:10 pm #72388
    LJ
    Member

    Perfect. Thank you so much! 🙂

  • Author
    Posts
Viewing 5 posts - 1 through 5 (of 5 total)
  • The forum ‘Design Tips and Tricks’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2025 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble