Title: nasho's Replies | WordPress.org

---

# nasho

  [  ](https://wordpress.org/support/users/nasho/)

 *   [Profile](https://wordpress.org/support/users/nasho/)
 *   [Topics Started](https://wordpress.org/support/users/nasho/topics/)
 *   [Replies Created](https://wordpress.org/support/users/nasho/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/nasho/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/nasho/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/nasho/engagements/)
 *   [Favorites](https://wordpress.org/support/users/nasho/favorites/)

 Search replies:

## Forum Replies Created

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

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Relevanssi - A Better Search] Post content is not searchable in admin search or in code](https://wordpress.org/support/topic/post-content-is-not-searchable-in-admin-search-or-in-code/)
 *  Thread Starter [nasho](https://wordpress.org/support/users/nasho/)
 * (@nasho)
 * [1 week, 4 days ago](https://wordpress.org/support/topic/post-content-is-not-searchable-in-admin-search-or-in-code/#post-18921948)
 * Well when I removed/unchecked a custom post type from the relevanssi indexes,
   the search didn’t return results from them, only from the ones that are checked(
   e.g. regular posts). so that means the relevannsi was active, right?
   And while
   the index for the custom post type is still unchecked, i disabled the function,
   and the search returned results from the custom post type, and I guess that’s
   the wordpress search engine returning it. Edit: sorry, this is inaccurate, it
   also didn’t return results from the custom post type.
    -  This reply was modified 1 week, 4 days ago by [nasho](https://wordpress.org/support/users/nasho/).
    -  This reply was modified 1 week, 4 days ago by [nasho](https://wordpress.org/support/users/nasho/).
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Relevanssi - A Better Search] Post content is not searchable in admin search or in code](https://wordpress.org/support/topic/post-content-is-not-searchable-in-admin-search-or-in-code/)
 *  Thread Starter [nasho](https://wordpress.org/support/users/nasho/)
 * (@nasho)
 * [1 week, 4 days ago](https://wordpress.org/support/topic/post-content-is-not-searchable-in-admin-search-or-in-code/#post-18921838)
 * So I put this code in my functions.php to force relevanssi usage. It seems to
   work based on my tests (by disabling a custom post type). However, it doesn’t
   seem to acquire the search settings i set in the admin page (like whole word 
   setting, car returns posts with the word careful), while the admin search and
   my custom search (where i removed the relevanssi_do_query() function, thank you)
   follows it. They only return posts with the word car. Anything i can add in the
   code below to make sure it inherit my admin search settings?
 * add_action(‘pre_get_posts’, ‘enable_relevanssi_for_search’);
   function enable_relevanssi_for_search(
   $query) {if (!is_admin() && $query->is_search() && $query->is_main_query()) {
   $query->set(‘relevanssi’, true);}}
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Relevanssi - A Better Search] Post content is not searchable in admin search or in code](https://wordpress.org/support/topic/post-content-is-not-searchable-in-admin-search-or-in-code/)
 *  Thread Starter [nasho](https://wordpress.org/support/users/nasho/)
 * (@nasho)
 * [1 week, 4 days ago](https://wordpress.org/support/topic/post-content-is-not-searchable-in-admin-search-or-in-code/#post-18921535)
 * Thank you, I found this in my themes’ function.php. I forgot I put it a couple
   of years ago and what it does. I guess that time, I didn’t want to search the
   post content but my requirement changed now. So I disabled this code and it works
   now.
   add_filter( ‘relevanssi_index_content’, ‘return_false’ );function return_false(){
   return false;}By the way, since post content was searchable in my site’s main
   search bar even before disabling the code, does that mean that all this time,
   my main search bar is being served by wordpress’ default search engine and not
   by relevanssi?
    -  This reply was modified 1 week, 4 days ago by [nasho](https://wordpress.org/support/users/nasho/).
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Relevanssi - A Better Search] Post content is not searchable in admin search or in code](https://wordpress.org/support/topic/post-content-is-not-searchable-in-admin-search-or-in-code/)
 *  Thread Starter [nasho](https://wordpress.org/support/users/nasho/)
 * (@nasho)
 * [1 week, 4 days ago](https://wordpress.org/support/topic/post-content-is-not-searchable-in-admin-search-or-in-code/#post-18921313)
 * That’s what I used, the ‘Admin search’ in the Dashboard. 
   I checked out a post
   with ‘vehicle’ in its content in the debugger, and the word vehicle did not appear:
   The title
 * 2016 fare
 * Other taxonomies
 * adduci canada decarlos dortch drew gengen j jeremy katherine lee little pat r
   robert simmons sloan stewart thomas torrey triplett usa value
 * it seems it indexed my ‘actors’ for one, which is correct since i checked it.
   but how do i include the post content since I don’t see it in the settings.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Ad Injection] Ads not showing, probably due to theme](https://wordpress.org/support/topic/ads-not-showing-probably-due-to-theme/)
 *  Thread Starter [nasho](https://wordpress.org/support/users/nasho/)
 * (@nasho)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/ads-not-showing-probably-due-to-theme/#post-3217378)
 * Hi reviewmylife, I narrowed it somewhat to this line in your ad-injection.php:
 * `if (!in_the_loop()) return $content; // Don't insert ads into meta description
   tags`
 * That line is found in `function adinj_content_hook($content)`. If I remove that
   line, then the ads are showing! 🙂 So I’m getting there.
 * So this means the theme I’m using is doing something which makes your plugin 
   think that it’s somewhere in the meta description tags section, or it has something
   to do with it.
 * You got any idea what I could change in the theme? I mean, I can remove that 
   line from your plugin but it might have consequence like the ads will be inserted
   into meta description tags.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Ad Injection] Ads not showing, probably due to theme](https://wordpress.org/support/topic/ads-not-showing-probably-due-to-theme/)
 *  Thread Starter [nasho](https://wordpress.org/support/users/nasho/)
 * (@nasho)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/ads-not-showing-probably-due-to-theme/#post-3217371)
 * Hi reviewmylife, I think the Ad injection might not be recognizing the posts 
   page as such, that’s why it treats it as a page to ignore? In the Tick to disable
   ads section, though, the posts are recognized by Ad Injection as it reflects 
   the number of total posts (e.g. Single(4)). But when the posts are actually being
   viewed, no ad is showing as I think it is ignoring it. Any idea what variable
   I can change? I’m really new to WordPress 😛
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Ad Injection] Ads not showing, probably due to theme](https://wordpress.org/support/topic/ads-not-showing-probably-due-to-theme/)
 *  Thread Starter [nasho](https://wordpress.org/support/users/nasho/)
 * (@nasho)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/ads-not-showing-probably-due-to-theme/#post-3217370)
 * I replaced the line:
 * `php require_once('single-review.php');`
 * with:
 * `the_content(__('Read More »', 'gp_lang'));`
 * ..directly and still, the ads did not display too. So I guess that wasn’t it.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Ad Injection] Ads not showing, probably due to theme](https://wordpress.org/support/topic/ads-not-showing-probably-due-to-theme/)
 *  Thread Starter [nasho](https://wordpress.org/support/users/nasho/)
 * (@nasho)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/ads-not-showing-probably-due-to-theme/#post-3217369)
 * Hi reviewmylife, thanks for the quick reply.
 * I’m a bit of a coder myself so I am investigating the files myself. If I understand
   it right, the ads should be triggered by the line below:
 * `the_content(__('Read More »', 'gp_lang'));`
 * Is that right? If so, it seems that in the theme I’m using, single.php requires
   single-review.php (via require_once), then single-review.php calls review-tabs.
   php via require_once too, and it is in the file review-tabs.php where the line..
 *  `(the_content(__('Read More »', 'gp_lang'));)`
 * ..is being called.
 * So with this setup I guess your hooks are not being triggered. Can you suggest
   anything I can do myself so that the ads will be triggered by the line from review-
   tabs.php?

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