• Resolved vpbay

    (@vpbay)


    We use embedded videos from video streaming service. I would like to put a banner under the video. I cannot find the appropriate code for it in single php. When I put it goes under similar posts. But I want to put it under video before similar posts plugin. How to do?

    Note: Link NSFW – xxx

    • This topic was modified 7 years, 2 months ago by vpbay.

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

Viewing 1 replies (of 1 total)
  • Theme Author tubegtld

    (@tubegtld)

    My guess is that your related posts plugin is using a filter on ‘the_content’ to stick their code in there.

    You can do the same to add your banner using something like the code below.

    add_filter( 'the_content', 'my_tube_content_banner', 10, 1 );
    
    function my_tube_content_banner( $content ) {
    
      // only work on single post main content
      if( ! ( is_singular('post') && is_main_query() ) ) return;
    
      $banner = 'BANNER HERE';
    
      return $content . $banner;
    
    }

    NOTE: You may need to find the code in their plugin that’s inserting the related videos so you can check the priority and make sure yours is higher. It’s 10 in the example.

    Hope that helps.

    • This reply was modified 7 years, 2 months ago by tubegtld.
Viewing 1 replies (of 1 total)
  • The topic ‘How to add banner under video ?’ is closed to new replies.