Support » Plugin: WP Fusion Lite » get_tags(); function

  • Resolved adiestrar

    (@adiestrar)


    Hi:

    I want to hide a button to user in case they have a specific tag (mailchimp). Accoding with the documentation I can use the ‘wpf_has_tag’ function. But it seems to not be working. Is this fuction useful for it?

    function hide_support_button()
    {
      if ( wpf_has_tag( 'No support' ) ) {
      echo('<style type="text/css" media="screen">
    .stm_lms_lesson_comments__top .btn {
        display: none !important;
    }
    </style>');
    }}
    
    add_action( 'wp_head', 'hide_support_button' );

    Thanks in advance

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Plugin Author verygoodplugins

    (@verygoodplugins)

    @adiestrar That code looks right, but Mailchimp uses IDs for tags, and so you’d need to use an ID with the wpf_has_tag() function.

    You should be able to see the tag IDs in Mailchimp.

    Or, you can use

    if ( wpf_has_tag( wpf_get_tag_id( 'No support' ) ) ) {

    wpf_get_tag_id( 'No support' ) will get the tag ID for you from the name.

Viewing 1 replies (of 1 total)
  • The topic ‘get_tags(); function’ is closed to new replies.