Different footer on Category lists?

[ad_1]

Hello @static1635,

Thank you for reaching out,
You can set different footers in the pages, posts, etc, CPT(here: https://postimg.cc/WhSkd6tZ), but you cannot set the different footers for categories pages…

The solution to achieve it is customization, and it needs familiarity with PHP, if you are unfamiliar with PHP, you can contact a PHP expert. To do this, first, you need to use the child theme. To do this you can create some footers in WP Dashboard > OceanWP > My Library: https://docs.oceanwp.org/article/600-how-to-create-a-custom-footer.

Then in the root of the child theme, create a footer.php.
Download the original and simple child theme: https://docs.oceanwp.org/article/90-sample-child-theme.

Then go ahead and use the PHP like the following code:

<?php
if ( is_category( 'news' ) ) {
	echo do_shortcode('[NEWS_FOOTER]');
} elseif ( is_category( 'sports' ) ) {
	echo do_shortcode('[SPORT_FOOTER]');	
} else {	
	echo do_shortcode('[DEFAULT_FOOTER]');
}
?>

<?php wp_footer(); ?>
</body>
</html>

For instance, please check this screenshot: https://postimg.cc/8fJ07PmJ.

Ensure the category names in the if statements match your actual category slugs. If needed, create additional elseif statements for other categories.
Save the footer.php file.

Important Considerations:
1. This process requires a basic understanding of PHP code. If you’re not comfortable editing code, seek assistance from a developer.
2. Always create a backup of your child theme before making customizations.
3. Keep the code updated if you update OceanWP or WordPress.
Alternative Solutions: If this method feels too technical, consider using plugins that offer more user-friendly ways to manage footers on category pages.

I hope it helps.
Best Regards

Brilliant, thank you. Yes, I am experienced in PHP, Thanks for the tips, I like tinkering under the hood. The site mentioned is running a child theme.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer