Install Config Wiki

All about installing, configuring and troubleshooting

User Tools

Site Tools


wiki:how-to-remove-thanks-to-wordpress-and-wp-advocate-in-the-footer

How to remove "Thanks to WordPress and WP-Advocate" in the WordPress footer

This applies to the WordPress Theme known as WP-Advocate by https://www.wpdevshed.com/our-themes/.

Note: The following solution has been tested to work when the default page (homepage) of the website is configured to be a static page rather than being the blog page of the WordPress website. In that configuration, a different static page (or no page at all) is designated as the blog page. Also, I am working in a Windows server environment, so I will be using a text editor that I installed known as NotePad++ in order to edit PHP files.

Let's get started.

First, find the footer.php file for the theme known as WP Advocate. Within the WordPress core files, the footer.php file is located in the path /your-website-root/wp-content/themes/wp-advocate/footer.php

Using NotePad++ Open the file called “footer.php” and then “save as” – that is, save a backup of this original footer.php file and name it – “footer.php-backup”

Close the backup that you just created and again use Notepad++ to re-open the original file called “footer.php”

Locate the following source code / script:

<footer id="colophon" role="contentinfo">
    <div id="site-generator">

        <?php echo __('&copy; ', 'wp-advocate') . esc_attr( get_bloginfo( 'name', 'display' ) );  ?>
        <span><?php if(is_home() || is_front_page()): ?>
            - <?php echo __( 'Thanks to ','wp-advocate' ); ?><a href="<?php echo esc_url( __( 'https://wordpress.org/', 'wp-advocate' ) ); ?>" target="_blank"><?php printf('%s', 'WordPress' ); ?></a> <span><?php _e('and','wp-advocate'); ?></span> <a href="<?php echo esc_url( __( 'https://wpdevshed.com/themes/advocate/', 'wp-advocate' ) ); ?>" target="_blank"><?php printf( esc_html( '%s', 'wp-advocate' ), 'WP Advocate' ); ?></a>
        <?php endif; ?>
        </span>
        <?php wp_advocate_footer_nav(); ?>
        
    </div>
</footer><!-- #colophon -->

Now find the following conditional within the above script:

<?php if(is_home() || is_front_page()): ?>

Here is the solution.

Replace || with && and then save(/overwrite) the footer.php file.

Following is the resulting conditional:

<?php if(is_home() && is_front_page()): ?>

This symbol || is the OR logical operator. This symbol && is the AND logical operator.

The footer section of your homepage should no longer display “Thanks to WordPress and WP Advocate.” It will only display the copyright notice of the title element of the website.

wiki/how-to-remove-thanks-to-wordpress-and-wp-advocate-in-the-footer.txt · Last modified: 2020/02/13 11:25 by wikiadmin