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.
https://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="https://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.