Title: Removed wp_query &#8211; same result
Last modified: August 22, 2016

---

# Removed wp_query – same result

 *  [whitneyr](https://wordpress.org/support/users/whitneyr/)
 * (@whitneyr)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/removed-wp_query-same-result/)
 * Hi I’ve removed the wp_query from two files: search.php and seach-incource.php
 * Before removal (Highlighted text removed):
    Search.php [http://pastebin.com/DQrVnScv](http://pastebin.com/DQrVnScv)
   Search-incourse.php [http://pastebin.com/1vJMEHFQ](http://pastebin.com/1vJMEHFQ)
 * My search results are not working.
    I have also added the code to functions.php
   as mentioned here: [http://www.relevanssi.com/knowledge-base/posts-per-page/](http://www.relevanssi.com/knowledge-base/posts-per-page/)
 * Here is my functions.php
    [http://pastebin.com/saqY5Gh8](http://pastebin.com/saqY5Gh8)
 * I mainly want to search within shortcodes.
    For instance, the name ‘thomas’ should
   show up more than once in my search. However, on the page where it is nested 
   within a shortcode, it does not appear.
 * Please see my site here: [http://www.boycelab.org/](http://www.boycelab.org/)
 * I thank you in advance!
 * [https://wordpress.org/plugins/relevanssi/](https://wordpress.org/plugins/relevanssi/)

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Plugin Author [Mikko Saari](https://wordpress.org/support/users/msaari/)
 * (@msaari)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/removed-wp_query-same-result/#post-5280740)
 * There’s no need to remove those lines from the files, they just get the number
   of results found and work just fine with Relevanssi. Looks like you’re getting
   results from Relevanssi, no problems with that.
 * Have you enabled “Expand shortcodes in post content:” option in Relevanssi settings?
 *  Thread Starter [whitneyr](https://wordpress.org/support/users/whitneyr/)
 * (@whitneyr)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/removed-wp_query-same-result/#post-5280760)
 * Thank you for your response.
    Yes “Expand shortcodes in post content: is selected.
 * Should I clear cache and try again?
 * I am still not getting my search on “thomas” to pull up this page: [http://www.boycelab.org/members/](http://www.boycelab.org/members/)
   which is the page with shortcodes.
 *  Thread Starter [whitneyr](https://wordpress.org/support/users/whitneyr/)
 * (@whitneyr)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/removed-wp_query-same-result/#post-5280762)
 * Thank you for your response.
    Yes “Expand shortcodes in post content: is selected.
 * Should I clear cache and try again?
 * I am still not getting my search on “thomas” to pull up this page: [http://www.boycelab.org/members/](http://www.boycelab.org/members/)
   which is the page with shortcodes.
 *  Plugin Author [Mikko Saari](https://wordpress.org/support/users/msaari/)
 * (@msaari)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/removed-wp_query-same-result/#post-5280859)
 * Well, whether Relevanssi can find the shortcode contents depends a lot on the
   way the shortcode is made. It may be Relevanssi is not seeing the content inside
   the shortcode. I can’t tell without taking a closer look at your site.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Removed wp_query – same result’ is closed to new replies.

 * ![](https://ps.w.org/relevanssi/assets/icon-256x256.png?rev=2025044)
 * [Relevanssi - A Better Search](https://wordpress.org/plugins/relevanssi/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/relevanssi/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/relevanssi/)
 * [Active Topics](https://wordpress.org/support/plugin/relevanssi/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/relevanssi/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/relevanssi/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [Mikko Saari](https://wordpress.org/support/users/msaari/)
 * Last activity: [11 years, 8 months ago](https://wordpress.org/support/topic/removed-wp_query-same-result/#post-5280859)
 * Status: not resolved