• Resolved azadbakhsh

    (@azadbakhsh)


    Hello
    I want to remove the add to wishlist on the archive pages. How can I do this?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi there!
    Thank you for contacting us ??

    We do not have any option or way to do that, but I have just created a custom code to achieve it:

    if ( ! function_exists( 'yith_wcwl_hide_icon_non_logged_in' ) ) {
    	function yith_wcwl_hide_icon_non_logged_in() {
    
    		if ( is_archive() ) {
    			?>
    			<style>
    				.yith-wcwl-add-to-wishlist {
    					display: none;
    				}
    			</style>
    			<?php
    		}
    	}
    	add_action( 'wp_head', 'yith_wcwl_hide_icon_non_logged_in' );
    }

    That code should hide the button only in archive pages.
    You have to paste it into the functions.php file of your active theme.

    Could you try it?
    Have a nice day!

    Thread Starter azadbakhsh

    (@azadbakhsh)

    Hello

    I tested it but it didn’t work.

    I found my theme has a template for the add to wish, so I changed it and worked.

    I added an if filter and worked. Thank you for your help.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Remove loop add to wish buttons on Archive Pages’ is closed to new replies.