• Skip to main content
  • Skip to primary sidebar
  • Skip to footer

Foliovision

  • Weblog
    • FV Player
    • WordPress
    • Video of the Week
    • Case Studies
    • Business
  • About
    • Testimonials
    • Meet the Team
    • We Support
    • Careers
    • Contact
    • Pricing
  • Products
  • Support
    • FV Player Docs
    • Pro Support
  • Login
  • Basket is empty

Disable Video Ads For Logged-in Users

[Solved]

Foliovision › Forums › FV Player › Requests and Feedback › Disable Video Ads For Logged-in Users

  • MBD S. 8 years ago

    Hello,

    I’m a FV Player Pro customer. I want to be able to disable video ads for logged-in users, to encourage people to sign up.

    Is this possible?

    Thanks in advance

Viewing 4 replies - 1 through 4 (of 4 total)
  • MBD S. 8 years ago

    I think I might have figures this out by editing line 2788 on fv-player-pro.class.php

    Old:

    if (count($aVideoAdsEnabled) == 0 ) {
    return $aItems;
    }
    New:
    if (count($aVideoAdsEnabled) == 0 OR is_user_logged_in() ) {
    return $aItems;
    }

    Do you agree this is the right place to put the code? I’m guessing there could be an easier way but I just don’t want to wait for another update. Can I keep this as it is without problems?

    Thank you

    Martin 8 years ago

    Hello MBD,

    you shouldn’t be modifying any plugin core code.

    Instead, you can unhook the function which puts in these video ads via WP filters API by putting this code into your theme functions.php file:

    add_action( 'init', 'fv_tweak_video_ads' );
    
    function fv_tweak_video_ads( $arg ) {
      if( is_user_logged_in() ) {
        global $FV_Player_Pro;
        remove_filter( 'fv_flowplayer_playlist_items', array( $FV_Player_Pro, 'video_ads' ), 10, 2 );
        remove_filter( 'fv_flowplayer_playlist_item_html', array( $FV_Player_Pro, 'video_ads_item_html') ); 
      }
    }
    

    Please let us know how it goes. We could add an option for this as well, but then some websites will require that the user has a paid membership and then it goes really complex. We should master that though.

    Thanks,
    Martin

    MBD S. 8 years ago

    Thank you, Martin. I think the issue you raised could be addressed by enabling/disabling ads for certain user roles. That shouldn’t be too complex. People should appoint a different role for paid members.

    MBD S. 8 years ago

    Your code does work by the way. Thanks

Viewing 4 replies - 1 through 4 (of 4 total)
Reply To: Disable Video Ads For Logged-in Users



Please Sign in or Register to upload files.

Related Posts

  1. Let users loop your videos as they like

  2. Microsoft AdCenter Setup for Mac Users

    Microsoft AdCenter Setup for Mac Users

  3. How to Use the Built-in Video Checker

Primary Sidebar

Requests and Feedback

    Categories

    • Business
    • Camera Reviews
    • Case Studies
    • Design
    • FV Player
    • Internet Marketing
    • IT
    • Life
    • SEO
    • Slovak
    • Video of the Week
    • WordPress

    Footer

    Our Plugins

    • FV WordPress Flowplayer
    • FV Thoughtful Comments
    • FV Simpler SEO
    • FV Antispam
    • FV Gravatar Cache
    • FV Testimonials

    Free Tools

    • Pandoc Online
    • Article spinner
    • WordPress Password Finder
    • Delete LinkedIn Account
    • Responsive Design Calculator
    Foliovision logo
    All materials © 2026 Foliovision s.r.o. | Panská 12 - 81101 Bratislava - Slovakia | info@foliovision.com
    • This Site Uses Cookies
    • Privacy Policy
    • Terms of Service
    • Site Map
    • Contact
    • Tel. ‭+421 2/5292 0086‬