WordPress.org

Forums

Mantra
[resolved] Removing Footer (4 posts)

  1. Gib123
    Member
    Posted 1 year ago #

    Hi Guys,

    I have trawled through other posts on the topic, but most of the solutions dont work for me. I have been told its a hook orientated footer message, but i dont really know what that means, or how to alter it.

    First off i know the footer message is in support for the theme, and i love the mantra theme, first time ive used it but it is a great theme, i just really prefer a minimal footer, with just my copyright text on it.

    So if someone could help me out with the change of hook or change of code needed to remove the mantra footer, i would REALLY appreciate it ..

    Cheers,

    Matt

  2. Those links are added via an action and can be removed without editing the original theme's files.

    Here's how you do it.

    1. Create an empty directory in wp-content/themes and name it mantra-child.

    2. In that new directory create a style.css file and put these lines in it.

    /*
    Theme Name:     Mantra Child Theme
    Description:    Child theme for Mantra
    Template:       mantra
    Version:        0.1.0
    */
    
    @import url("../mantra/style.css");

    Then visit your WordPress dashboard and activate the Mantra Child Theme.

    3. Now in that same mantra-child directory create a functions.php file and put only these lines in it. Do not copy anything from the original theme's functions.php file. That will break things if you do.

    http://pastebin.com/cBE0DEhF

    <?php
    
    // Remove old copyright links
    add_action( 'init' , 'mh_remove_copyright_link' , 15 );
    function mh_remove_copyright_link() {
            // remove_action( 'cryout_footer_hook' , 'mantra_copyright' , 11) ;
            remove_action( 'cryout_footer_hook' , 'mantra_site_info' , 12) ;
            // remove_action( 'cryout_footer_hook' , 'mantra_footer_social' , 13) ;
    }
    
    // Add my own copyright text
    add_action( 'cryout_footer_hook' , 'mh_footer_info' , 30 );
    function mh_footer_info() {
    
    $output  = '<div style="text-align:center;clear:both;padding-top:4px;" >';
    $output .= '<a href="http://www.example.com/">Some AMAZING LINKS FROM MARS goes here</a> | <a href="' . get_bloginfo( 'wpurl' ) . '">' . get_bloginfo( 'name' ) . '</a>';
    $output .= '</div><!-- #site-info -->';
    
       echo do_shortcode( $output );
    }

    You can edit the variable $output and put whatever links or text you like. There are other hooks that you can remove as well but I've left those commented out because they don't really apply to the footer links exactly.

  3. Gib123
    Member
    Posted 1 year ago #

    Your a champion Jan, thank you very much mate.

  4. LatinZoneMagazine
    Member
    Posted 1 year ago #

    Hi Jan!!!

    I want to do the same but want the footer to show the copyright/the magazine name/ the copyright year and then Powered by The company Name. How can I do it? I tried but it's backwards and the year is not showing. Could you help me?

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic