Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Inserting shortcode into search.php
This topic contains 4 replies, has 2 voices, and was last updated by Ernest Marcinko 7 years, 8 months ago.
- AuthorPosts
- January 11, 2017 at 3:52 pm #11564
Hi,
Since I cannot modify the menu bear, my theme has a search icon, for which the results are very basic, but I am wokring on that. What I am trying to do is somehow, include the ajax pro search into the results page. I thought I would try the line below, but I do not get any results. Can you suggest a better way as the search results page has no template to modify.
<div class=’page-heading-container clearfix’>
<section class=”search_form_field”>
<?php
do_shortcode( ‘wpdreams_ajaxsearchpro id=4’ );
// echo “<h4>”.__(‘New Search’,’avia_framework’).”</h4>”;
echo “<p>”.__(‘Try Another Search’,’avia_framework’).”</p>”;get_search_form();
echo “<span class=’author-extra-border’></span>”;
?>
</section>
</div>Thank you
January 11, 2017 at 3:56 pm #11565Hi,
The do_shortcode() function call must be echoed, so try changing this line:
do_shortcode( 'wpdreams_ajaxsearchpro id=4' );
to this:
echo do_shortcode( '[wpdreams_ajaxsearchpro id=4]' );
That should give you an output.
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
January 11, 2017 at 3:57 pm #11566Also, I just noticed the shortcode brackets missing:
Best,echo do_shortcode( '[wpdreams_ajaxsearchpro id=4]' );
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
January 11, 2017 at 4:01 pm #11567Wow that was damn quick and worked like a charm. Thank you very much for your help once again!!!
January 11, 2017 at 4:04 pm #11568You cannot access this content. Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
- AuthorPosts
You must be logged in to reply to this topic.