Remve Footer Credits

Hola, can you please provide some code so I can remove the footer credits or change them?

Thanks, will you be making a Pro version of this theme?

Thanks again - Louise :slight_smile:

Hi Louise,

Thank you for asking.

To change the default footer credits, you can add the below PHP snippet into either your child theme’s functions.php file or use functionality plugin like Code Snippets.


// Remove default footer credit block
remove_action('greatmag_footer', 'greatmag_footer_bottom', 8);

// Create new footer credit block
add_action('greatmag_footer', 'custom_greatmag_footer_bottom', 8);
function custom_greatmag_footer_bottom(){
?>

  <div class="row bottom-footer" id="bottom-footer">
    <div class="container">

      <div class="site-info">
        Your custom credit text goes here.
      </div>

      <nav id="footer-navigation" class="footer-navigation footer-menu-box">
        <?php wp_nav_menu( array( 'theme_location' => 'footer', 'menu_class' => 'nav nav-pills footer-menu', 'depth' => 1, 'fallback_cb' => false ) ); ?>
      </nav>
    </div>
  </div>

<?php
}


Yes, there will be GreatMag Pro. We’re developing it. Please be patience.

Regards,
Kharis

Thanks Kharis, I did that and changed the custom text but now I have two footer credits!

Thanks again for your awesome help :slight_smile:

http://sfhis564.gb-02.live-paas.net/

Sorry, I meant to ask Kharis how to remove the bottom one.

Thanks!

Hello there,

Please verify you didn’t ignore the below lines as I mentioned previously.


// Remove default footer credit block
remove_action('greatmag_footer', 'greatmag_footer_bottom', 8);

Regards,
Kharis

Hi Kharis, yes cut and paste in exactly to code Snippets

// Remove default footer credit block
remove_action(‘greatmag_footer’, ‘greatmag_footer_bottom’, 8);

// Create new footer credit block
add_action(‘greatmag_footer’, ‘custom_greatmag_footer_bottom’, 8);
function custom_greatmag_footer_bottom(){
?>

<div class=“row bottom-footer” id=“bottom-footer”>
<div class=“container”>

  &lt;div class="site-info"&gt;
    Copyright 2017 Ollie Bray
  &lt;/div&gt;

  &lt;nav id="footer-navigation" class="footer-navigation footer-menu-box"&gt;
    &lt;?php wp_nav_menu( array( 'theme_location' =&gt; 'footer', 'menu_class' =&gt; 'nav nav-pills footer-menu', 'depth' =&gt; 1, 'fallback_cb' =&gt; false ) ); ?&gt;
  &lt;/nav&gt;
&lt;/div&gt;

</div>

<?php
}

Hello there,

Thank you for the followup.

Please grant me to access your site admin area, so I can take another look. For security reason, please send the working login credentials to kharisblank@gmail.com; mention the link to this thread.

Regards,
Kharis

Awesome, have done so :slight_smile: Thanks.

For some reason, the below code doesn’t work if it’s called from plugin.


// Remove default footer credit block
remove_action('greatmag_footer', 'greatmag_footer_bottom', 8);

The solution, I added a custom class name (bottom-footer-custom) to your new footer block, which looks like this:


<div class="row bottom-footer bottom-footer-custom" id="bottom-footer">

Then I added the following custom CSS code to hide the default one.


.bottom-footer{
  display: none;
}
.bottom-footer.bottom-footer-custom{
  display: block;
}

Regards,
Kharis

For security reason, please remove my account.

Regards,
Kharis

Thanks Kharis!

Kind regards and all good wishes :slight_smile:

You’re welcome and best wishes. :slight_smile:

Feel free to open a new topic if you need anything else.

Regards,
Kharis

Hello Kharis,
I have been doing some updates to my site and have had to re-insert the custom credit code to code snippets: details below:

// Remove default footer credit block
remove_action(‘greatmag_footer’, ‘greatmag_footer_bottom’, 8);

// Create new footer credit block
add_action(‘greatmag_footer’, ‘custom_greatmag_footer_bottom’, 8);
function custom_greatmag_footer_bottom(){
?>

<div class=“row bottom-footer” id=“bottom-footer”>
<div class=“container”>

  &lt;div class="site-info"&gt;
    Your custom credit text goes here.
  &lt;/div&gt;

  &lt;nav id="footer-navigation" class="footer-navigation footer-menu-box"&gt;
    &lt;?php wp_nav_menu( array( 'theme_location' =&gt; 'footer', 'menu_class' =&gt; 'nav nav-pills footer-menu', 'depth' =&gt; 1, 'fallback_cb' =&gt; false ) ); ?&gt;
  &lt;/nav&gt;
&lt;/div&gt;

</div>

<?php

}

The domain is onetouchsolution.co.uk

Unfortunately the new credits are not appearing, additionally I have inserted the following to the custom css: to remove the standard footer credit.

.bottom-footer{
display: none;
}
.bottom-footer.bottom-footer-custom{
display: block;
}

Can you please help.

Many Thanks

Hello there,

Please try to use the child theme’s functions.php file instead of Code Snippets plugin.

Regards,
Kharis

Hello I have tried the functions.php
no changes it has not worked?

Pleas share your functions.php file https://gist.github.com/, and then put its link in your reply, so I can check.

Regards,
Kharis

I use the code snippet plugin and your code but the same thing happened and there is now two credits.
How do i remove the default one, as i don’t know how to get child themes and all. Can you please help.

Hello there,

Try using this PHP code:


// Remove default footer credit block
remove_action('greatmag_footer', 'greatmag_footer_bottom', 8);

// Create new footer credit block
add_action('greatmag_footer', 'custom_greatmag_footer_bottom', 8);
function custom_greatmag_footer_bottom(){
?>

  <div class="row bottom-footer bottom-footer2" id="bottom-footer">
    <div class="container">

      <div class="site-info">
        Your custom credit text goes here.
      </div>

      <nav id="footer-navigation" class="footer-navigation footer-menu-box">
        <?php wp_nav_menu( array( 'theme_location' => 'footer', 'menu_class' => 'nav nav-pills footer-menu', 'depth' => 1, 'fallback_cb' => false ) ); ?>
      </nav>
    </div>
  </div>

<?php
}

And then apply the below CSS code to Appearance > Customize > Additional CSS in your site dashboard.


.bottom-footer {
  display: none;
}

.bottom-footer.bottom-footer2 {
  display: block;
}

Regards,
Kharis

Thanks Man, it worked.

You’re welcome!

Please let us know in a new topic if you have any further questions, or if we can provide you with any other assistance.

Regards,
Kharis