Title: andy35's Replies | WordPress.org

---

# andy35

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

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

 Search replies:

## Forum Replies Created

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

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[FiboSearch - Ajax Search for WooCommerce] “Show all results” leads to the front page](https://wordpress.org/support/topic/show-all-results-leads-to-the-front-page/)
 *  Thread Starter [andy35](https://wordpress.org/support/users/andy35/)
 * (@andy35)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/show-all-results-leads-to-the-front-page/#post-14393533)
 * I found the issue causing this problem. This is for Damian, Clint and all who
   are facing this same problem.
 * The issue was a code snippet that was in Divi’s child theme “Wardrobe for Divi”.
   In child theme’s `functions.php` file had the following code:
 *     ```
       function custom_shop_page_redirect() {
           if( is_shop() ){
               wp_redirect( home_url( '/' ) );
               exit();
           }
       }
       add_action( 'template_redirect', 'custom_shop_page_redirect' );
       ```
   
 * What this suppose to do is that it redirects the common shop page `domain.com/
   shop` (displaying all products) to front page. The problem is that it also affects
   to search result page, which is filtered only to products.
 * First workaround for this is to remove the whole snippet. If you still want to
   redirect the common shop page, another workaround is to edit the if-statement
   line to be this:
    `if( is_shop() && ! is_search() ) {`
 * I didn’t design the client’s web shop (I’m just modifying it), so I don’t know
   if this code snippet is originally there or did the client’s web shop developer
   add it. So I also don’t know if the original web shop developer need to be slapped
   on the back of the head or the child theme’s developers. It took me 6-8 hours
   to solve this.
 * Hope this helps someone.
    -  This reply was modified 5 years, 3 months ago by [andy35](https://wordpress.org/support/users/andy35/).
      Reason: spell correcting
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[FiboSearch - Ajax Search for WooCommerce] “Show all results” leads to the front page](https://wordpress.org/support/topic/show-all-results-leads-to-the-front-page/)
 *  Thread Starter [andy35](https://wordpress.org/support/users/andy35/)
 * (@andy35)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/show-all-results-leads-to-the-front-page/#post-14391108)
 * Hi Clint and Damian!
 * Thank you for your response. It indeed seems to be a redirect issue. I found 
   out that the problem occurs when the search has the parameter `post_type=product`.
   Without it the search results are displaying fine.
 * I’m not the original developer of the website and I don’t have the FTP credentials,
   so I can’t read the .htaccess file. I presume there would be some explanations
   of redirects, if those are done by some plugin. Now I’m waiting my client to 
   send me FTP credentials so I can investigate this further.
 * But it’s certain that this is not related to your plugin so you can mark this
   as solved. For now it seems that this is related to Divi theme (or it’s child
   theme “Wardrobe for Divi”). I switched to another theme and the problem didn’t
   occur.
 * I’ll investigate further and if I find the source of the issue, I’ll post it 
   here. It may help you guys or other Divi users. Thank you for your help.

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