Jump to content


These Forums Are Now Read-Only


For TubePress support, please post a question here or open a support ticket and we will be glad to assist.


Photo

Trying to get search.php to display video / blog results


  • Please log in to reply
2 replies to this topic

#1 kittipetch pingkarawat

kittipetch pingkarawat

    Newbie

  • Members
  • Pip
  • 2 posts

Posted 09 February 2012 - 04:57 AM

I had a question and was wondering if it was possible to do this... When people search my blog I want it to display the blog post results including serach results for youtube videos at the bottom of the page for that search term that they searched. Is it possible? Been playing around but not sure if I'm doing this right?

I am adding this code in my search.php

<?php include "/home/nstpop5/domains/1stpopmusic.com/public_html/1stpopmusic/wp-content/plugins/tubepress_pro_2_2_9/sys/classes/TubePressPro.class.php";
print TubePressPro::getHtmlForShortcode('mode="tag" tagValue= <?php the_search_query(); ?> resultsPerPage="10"'); ?>


What I did above doesn't seem to be doing it... any suggestions?

#2 eric

eric

    Lead Developer

  • TubePress Staff
  • 2787 posts

Posted 10 February 2012 - 11:51 PM

Hi,

Sure, this is possible. Your solution was close. Try this instead:

<?phpinclude "/home/nstpop5/domains/1stpopmusic.com/public_html/1stpopmusic/wp-content/plugins/tubepress_pro_2_2_9/sys/classes/TubePressPro.class.php";print TubePressPro::getHtmlForShortcode('mode="tag" tagValue="' . get_search_query() . '" resultsPerPage="10"');?>
Notice that we're using get_search_query() instead of the_search_query(), and we slightly changed the syntax of the argument to getHtmlForShortcode(). Give this code a try and let us know how it works. Thanks!

#3 kittipetch pingkarawat

kittipetch pingkarawat

    Newbie

  • Members
  • Pip
  • 2 posts

Posted 11 February 2012 - 09:48 AM

worked perfectly!!!