Viewing 9 replies - 1 through 9 (of 9 total)
  • Thread Starter ram108

    (@ram108)

    Related You_t_Tube Videos

    see at plugin page in wordpress admin pannel

    Plugin Author Chris

    (@zenation)

    Thanks for the feedback. I guess changing the working title manually wasn’t the best idea^^ Anyway, I corrected the title and the fix is out. So thanks again ??

    How could I use this plugin to add related youtube video in wordpress search page. I mean based on search query, not just on Post Title or Post Tag. https://www.ads-software.com/extend/plugins/related-youtube-videos/

    Plugin Author Chris

    (@zenation)

    If you have acces the the search template of your theme you could place this (monster of a) code there, maybe below the WP search:

    <?php
    $RYTVAPI        = new RelatedYouTubeVideos_API();
    
    $RYTV_config    = array(
      'orderBy'         => 'relevance',
      'numberOfResults' => 5,
      'width'           => 480,
      'height'          => 360
    );
    
    $youTubeResults = $RYTVAPI->searchYouTube( get_search_query(), $RYTV_config['orderBy'], 0, $RYTV_config['numberOfResults'] );
    
    echo $RYTVAPI->displayResults(
      $youTubeResults,
      array(
        'id'      => 'relatedVideos',
        'width'   => $RYTV_config['width'],
        'height'  => $RYTV_config['height']
      )
    );
    
    ?>

    I’m not sure if or how you can hook into the process of showing the normal search results. But if I find a way I will implement the option so you wouldn’t have to fiddle with your theme’s template code.

    Plugin Author Chris

    (@zenation)

    I’ve added a new option “Site Search” (at least) to the widget. So on a search results page the widget can now show videos related to the user’s search.

    Thank you Chris. I hope you can find a way to add related youtube video in the normal search results not just a widget. I really want to add this in my search page template. I already tried the codes you give but unfortunately no luck.

    I want to show a related youtube video based on search query to my 301 page. The widget is already working. But I want to add it directly to my template. Thanks in advance Sir.

    Thank you so much Sir. I’ve found the solution of my problem. thanks for your codes… Thank you and Thank you…

    Plugin Author Chris

    (@zenation)

    You’re welcome ??

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Related YoutTube Videos’ is closed to new replies.