How to disable all ads on good news wp theme
The Good News WordPress theme!
To disable all ads on the Good News theme, you'll need to follow these steps:
Method 1: Using the theme's built-in ad management
- Log in to your WordPress dashboard.
- Go to Appearance > Customize.
- Click on Ad Management from the left-hand menu.
- Look for the Ad Blocker section and toggle the switch to Enabled.
- Save your changes.
This method should disable all ads on your website.
Method 2: Using a plugin
- Install and activate a plugin like Ad Inserter or AdSanity.
- Configure the plugin to disable ads on your website. For example, in Ad Inserter, go to Settings > Ad Inserter and toggle the switch to Disable ads.
Method 3: Editing the theme's code
Warning: This method requires some coding knowledge and may break your website if not done correctly. Proceed with caution!
- Log in to your WordPress dashboard.
- Go to Appearance > Editor.
- In the editor, navigate to the
functions.php
file of your theme (usually located in thewp-content/themes/good-news
directory). - Add the following code at the end of the file:
function disable_good_news_ads() { remove_action('wp_footer', 'good_news_display_ads'); remove_action('wp_footer', 'good_news_display_leaderboard'); } add_action('init', 'disable_good_news_ads');
- Save the changes.
This code removes the actions that display ads on your website.
Additional tips:
- If you're using a caching plugin like W3 Total Cache or WP Super Cache, make sure to clear the cache after disabling ads to ensure the changes take effect.
- If you're still seeing ads after disabling them, try clearing your browser cache and cookies.
- If you're using a third-party ad network, you may need to contact them to disable ads on your website.
Remember to always backup your website before making any changes to the code or theme files.