• Resolved metalsunny

    (@metalsunny)


    Hello,
    I am using the free version of plugin for testing purpose. Pls i would like to disable the label on my shop page. I want it to only display on product page. i need assistance. Thanks

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author ILLID

    (@mihail-barinov)

    Hi,

    Please try to use following code:

    add_filter( 'awl_labels_hooks', 'awl_labels_hooks' );
    function awl_labels_hooks( $hooks) {
        if ( is_array( $hooks ) && ! empty( $hooks ) ) {
            foreach( $hooks as $position => $hooks_list_type ) {
                if ( isset( $hooks[$position]['archive'] ) ) {
                    unset( $hooks[$position]['archive'] );
                }
            }
        }
        return $hooks;
    }

    You need to add it somewhere outside the plugins folder. For example, inside functions.php file of your theme or use some plugin for adding code snippets.

    Regards

    Thread Starter metalsunny

    (@metalsunny)

    It produced fatal error. When i tried to activate it via code snippet or theme function.php

    Plugin Author ILLID

    (@mihail-barinov)

    Can you please give me a screenshot of your function.php file with that code inside?

    Regards

    Thread Starter metalsunny

    (@metalsunny)

    ok

    • This reply was modified 3 years, 6 months ago by metalsunny.
    Thread Starter metalsunny

    (@metalsunny)

    Its working now. In inserted it via code snippet plugin. Thank you

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘How to disable label on shop page’ is closed to new replies.