Customize Footer Metro Theme

Community Forums Forums Design Tips and Tricks Customize Footer Metro Theme

This topic is: not resolved

This topic contains 22 replies, has 7 voices, and was last updated by  AC 1 year, 8 months ago.

Viewing 15 posts - 1 through 15 (of 23 total)
  • Author
    Posts
  • #20633

    Mike Gosling
    Participant
    Post count: 21

    http://mikegosling.com

    I have inserted the following css, which I found on Brian Gardner’s site, into the Metro Functions file:

    // Customize the entire footer
    remove_action( ‘genesis_footer’, ‘genesis_do_footer’ );
    add_action( ‘genesis_footer’, ‘custom_footer’ );
    function custom_footer() {
    ?>
    <p>&copy; Copyright 2013 <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
    }

    However, the footer appears at the bottom of the left content column, rather than in the footer of the website.

    How do I get my footer text into my website footer?

    Thanks,
    Mike


    Dr. Mike Gosling, The Emotional Leader Program

    #20636

    WMcKinley
    Participant
    Post count: 31

    Hi,
    I customized my footer by simply adding this to the functions.php file

    [CSS]
    add_filter(‘genesis_footer_creds_text’, ‘custom_footer_creds_text’);
    function custom_footer_creds_text() {
    echo “”;
    echo “Copyright &copy “, date(“Y”), ” YOURNAME.“;
    echo “”;
    }
    [/CSS]

    I didn’t need to do all that stuff you have above, just pasted that code in and it’s good.

    hope this show up ok, my first time answering a question


    W. McKinley – WMcKinley.comPowerEmini.com – Genesis Novice

    #20637

    WMcKinley
    Participant
    Post count: 31

    let me try it again to see if it shows up better

    [PHP]

    add_filter(‘genesis_footer_creds_text’, ‘custom_footer_creds_text’);
    function custom_footer_creds_text() {
    echo “”;
    echo “Copyright &copy “, date(“Y”), ” YOURNAME“;
    echo “”;
    }
    [/PHP]


    W. McKinley – WMcKinley.comPowerEmini.com – Genesis Novice

    #20750

    Mike Gosling
    Participant
    Post count: 21

    Thank you for your suggested code and appreciate your help.

    But I need to retain the code I have with my affiliate link etc. The problem is where the code is appearing – currently at the bottom of the content section rather than in the footer section. There seems to be a hook missing that will place the code in the correct place and supercede the current footer code.


    Dr. Mike Gosling, The Emotional Leader Program

    #20776

    snakeair
    Participant
    Post count: 164

    I used this plugin to edit the footer links.

     

    http://www.studiopress.com/plugins/simple-edits

    #20787

    Mike Gosling
    Participant
    Post count: 21

    Well I’ve tried every which way to get this to work, without success. All I get for my trouble is an ERROR:

    Parse error: syntax error, unexpected ‘<’ in /home/goslingm/public_html/wp-content/themes/metro/functions.php on line 163

    So in the absence of advice from StudioPress I’ll abandon trying to get it right.


    Dr. Mike Gosling, The Emotional Leader Program

    #20795

    RickRDuncan
    Participant
    Post count: 21

    Hey Mike,

    I just had to do this same thing so I wrote a quick tutorial on it. It should help you get your footer customized the way you need it. Here’s the link: http://www.wpsyntax.com/wordpress/customize-footer-metro-theme

    -rick


    -Rick R. Duncan
    RVAMedia.com

    #20796

    AC
    Blocked
    Post count: 7712

    Mike, use FTP and copy over the original functions.php file to your theme folder. The site will return. Sometimes when you copy/paste code that someone provides on here – the apostrophes (‘) and quote (“) do not appear properly. So you need to go back and type them in the correct way or copy/paste them in using Notepad first. If you still need help, please let me know. Don’t give up yet.

    #20805

    Mike Gosling
    Participant
    Post count: 21

    Thank you Anitac – I was able to FTP the functions.php file and the site has returned to normal. I won’t put anything there again until I’m sure it will work and not crash my site.

    Below is the code I got from BrianGardner.com (Which runs on Metro – although I expect he has customized his site). Unfortunately Brian does not say where to place the code, so I put it into the functions.php file. But it does not seem to like the code.

    Maybe it’s the <?php? I’ve posted the code with the <?php and without it. Still the code appears in the content section  and not the footer. Any ideas?

    Thanks, Mike

     

    =========

    <?php

    // Customize the return to top of page text
    add_filter( ‘genesis_footer_backtotop_text’, ‘custom_footer_backtotop_text’ );
    function custom_footer_backtotop_text($backtotop) {
    $backtotop = ‘[[footer_backtotop text="Return to Top"]]’;
    return $backtotop;
    }

    // Customize the credits
    add_filter( ‘genesis_footer_creds_text’, ‘custom_footer_creds_text’ );
    function custom_footer_creds_text() {
    echo ‘<div class=”creds”><p>’;
    echo ‘Copyright &copy; ‘;
    echo date(‘Y’);
    echo ‘ &middot; <a href=”http://mydomain.com”>My Custom Link</a> &middot; Built on the <a href=”http://www.studiopress.com/themes/genesis” title=”Genesis Framework”>Genesis Framework</a>’;
    echo ‘</p></div>’;
    }

    // Customize the entire footer
    remove_action( ‘genesis_footer’, ‘genesis_do_footer’ );
    add_action( ‘genesis_footer’, ‘custom_footer’ );
    function custom_footer() {
    ?>
    <p>&copy; Copyright 2013 <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
    }


    Dr. Mike Gosling, The Emotional Leader Program

    #20806

    Mike Gosling
    Participant
    Post count: 21

    Hey Rick, I’ve just seen your post above – I’ll give it a try. Thanks, Mike


    Dr. Mike Gosling, The Emotional Leader Program

    #20807

    RickRDuncan
    Participant
    Post count: 21

    Hey Mike,

    If you need any additional help just let me know. Sometimes the functions.php file can test a person’s sanity. One simple fat-finger mistake and the website goes kaput.

    -rd


    -Rick R. Duncan
    RVAMedia.com

    #20811

    Emma
    Participant
    Post count: 2

    Hi Rick, thank you!!! First I tried to widgetize the footer like you showed in the latter part of your post, which – as promised – made two new widgets show up in my widget page. However, the text boxes I placed in them didn’t remove the original text. I don’t know anything about php, so maybe I should have tried something else.

    I left it for now, because I resorted to your first method and it works like a charm! No more need for the Simple Edit plugin :)

    #20814

    RickRDuncan
    Participant
    Post count: 21

    Hey Emma,

    Happy to hear one of the solutions worked for you. I’m not sure why the second version didn’t work properly. It’s what I have running on a test website at http://www.rvaplaces.com. Even though I haven’t styled the text it works properly. Maybe you had partial code from first part mixed with part two???

    If you want to try again, I’ve zipped the contents of part 2. If you start from scratch it should work fine. http://www.wpsyntax.com/downloads/metro-theme-footer-widgetized.php.zip


    -Rick R. Duncan
    RVAMedia.com

    #20906

    Mike Gosling
    Participant
    Post count: 21

    Hi Rick,

    Well I gave it a go. Pretty much followed your instructions to the T, but got a heap of garbage at the top of my editor page in WP. So  I’ll move on now to find someone who I can pay to fix it for me. Thanks, Mike

    Here’s the garbage I got when I added your code:

    =======

    // Add span class to widget headlines add_filter( ‘widget_title’, ‘metro_widget_title’ ); function metro_widget_title( $title ){ if( $title ) return sprintf(‘%s’, $title ); } // Load Backstretch script and prepare images for loading add_action( ‘wp_enqueue_scripts’, ‘metro_enqueue_scripts’ ); function metro_enqueue_scripts() { // Load scripts only if custom background is being used if ( ! get_background_image() ) return; wp_enqueue_script( ‘metro-backstretch’, get_bloginfo( ‘stylesheet_directory’ ) . ‘/js/backstretch.js’, array( ‘jquery’ ), ’1.0.0′ ); wp_enqueue_script( ‘metro-backstretch-set’, get_bloginfo(‘stylesheet_directory’).’/js/backstretch-set.js’ , array( ‘jquery’, ‘metro-backstretch’ ), ’1.0.0′ ); wp_localize_script( ‘metro-backstretch-set’, ‘BackStretchImg’, array( ‘src’ => get_background_image() ) ); } // Register widget areas genesis_register_sidebar( array( ‘id’ => ‘subnav-left’, ‘name’ => __( ‘Subnav – Left’, ‘metro’ ), ‘description’ => __( ‘This is the left side of the subnav section.’, ‘metro’ ), ) ); genesis_register_sidebar( array( ‘id’ => ‘home-top’, ‘name’ => __( ‘Home – Top’, ‘metro’ ), ‘description’ => __( ‘This is the top section of the homepage.’, ‘metro’ ), ) ); genesis_register_sidebar( array( ‘id’ => ‘home-middle-left’, ‘name’ => __( ‘Home – Middle Left’, ‘metro’ ), ‘description’ => __( ‘This is the middle left section of the homepage.’, ‘metro’ ), ) ); genesis_register_sidebar( array( ‘id’ => ‘home-middle-right’, ‘name’ => __( ‘Home – Middle Right’, ‘metro’ ), ‘description’ => __( ‘This is the middle right section of the homepage.’, ‘metro’ ), ) ); genesis_register_sidebar( array( ‘id’ => ‘home-bottom’, ‘name’ => __( ‘Home – Bottom’, ‘metro’ ), ‘description’ => __( ‘This is the bottom section of the homepage.’, ‘metro’ ), ) ); genesis_register_sidebar( array( ‘id’ => ‘after-post’, ‘name’ => __( ‘After Post’, ‘metro’ ), ‘description’ => __( ‘This is the after post section.’, ‘metro’ ), ) );


    Dr. Mike Gosling, The Emotional Leader Program

    #20915

    AC
    Blocked
    Post count: 7712

    Mike, I am totally bewildered here. You can try this – http://my.studiopress.com/snippets/footer/ and you can also just install the Genesis Simple Edits – http://www.studiopress.com/plugins/simple-edits.

Viewing 15 posts - 1 through 15 (of 23 total)

You must be logged in to reply to this topic.