• How do I remove the heart icon only from certain galleries? I tried using CSS and page-id, but they all seem to have the same page-id. Thanks.

    .page-id-1519 .sunshine-image-menu .fa-heart {
    display: none;
    }

Viewing 1 replies (of 1 total)
  • Plugin Author WP Sunshine

    (@wpsunshine)

    CSS is not the recommended way to do this. Instead, use PHP:

    add_filter( 'sunshine_image_menu', 'sunshine_hide_favorites', 90, 2 );
    function sunshine_hide_favorites( $menu, $image ) {
        global $sunshine;
        if ( isset( $menu[5] ) ) {
            $galleries = array( 45, 56, 34 ); // IDs of your galleries here
            if ( in_array( SunshineFrontend::$current_gallery->ID, $galleries ) ) {
                unset( $menu[5] );
            }
        }
        return $menu;
    }

    Add this to your theme’s functions.php file or use a plugin like https://www.ads-software.com/plugins/insert-headers-and-footers/

Viewing 1 replies (of 1 total)
  • The topic ‘Remove heart icon from some galleries’ is closed to new replies.