Wordpress Search Problem with Themler

joehannay
12 Posts
joehannay posted this 20 January 2016

Hello,

I have found an issue with the Themler Search, I am interested in a work around or fix.

1- when you view my search and do a search in the search box, you only return a result for posts. * I need posts and pages to be searchable.
when searching for the text TAX you get the following see figure 1 (http://rosellepark.net/?s=tax&post_type=post)

2- When I manually change the URL and remove the string: &post_type=post (I get the desired result and posts and pages show) Is there a way to modify the button per click to remove &post_type=post see figure 2

Figure 1

1.PNG

Figure 2

2.PNG

Thanks very much

Hello, I have found an issue with the Themler Search, I am interested in a work around or fix. 1- when you view my search and do a search in the search box, you only return a result for posts. * I need posts and pages to be searchable. when searching for the text TAX you get the following see figure 1 (http://rosellepark.net/?s=tax&post_type=post) 2- When I manually change the URL and remove the string: &post_type=post (I get the desired result and posts and pages show) Is there a way to modify the button per click to remove &post_type=post see figure 2 Figure 1 !1.PNG! Figure 2 !2.PNG! Thanks very much
Vote to pay developers attention to this features or issue.
10 Comments
Order By: Standard | Newest
Stagger Lee
1818 Posts
Stagger Lee posted this 20 January 2016

Some plugin is making this. Seems so.

Some plugin is making this. Seems so.
joehannay
12 Posts
joehannay posted this 20 January 2016

Some plugin is making this. Seems so.

Thanks for the help but not in this case, I have disabled all plugins (see figure 3)

You can see the string: (http://rosellepark.net/?s=tax&post_type=post).

When you search for (http://rosellepark.net/?s=tax , it searching everything and works. There is a template/themler code problem, the search code in in the template as I have been reading.

Figure 3

3.PNG

> Some plugin is making this. Seems so. Thanks for the help but not in this case, I have disabled all plugins (see figure 3) You can see the string: (http://rosellepark.net/?s=tax&**post_type**=**post**). When you search for (http://rosellepark.net/?s=tax , it searching everything and works. There is a template/themler code problem, the search code in in the template as I have been reading. Figure 3 !3.PNG!
joehannay
12 Posts
joehannay posted this 20 January 2016

I am no coder, that's why I bought Themler, however, the search string, where ever it resides, needs to remove: &post_type=post

and just keep: ?s=

would fix the issue if I know where to find it or fix it.

I am no coder, that's why I bought Themler, however, the search string, where ever it resides, needs to remove: &post_type=post and just keep: ?s= would fix the issue if I know where to find it or fix it.
Stagger Lee
1818 Posts
Stagger Lee posted this 20 January 2016

Add this in your Themler settings, CMS code. But I am afraid not all problems are solved by it. Will check later if it search by custom post types. I use them on almost all websites.

function wpshock_search_filter( $query ) {
    if ( $query->is_search ) {
        $query->set( 'post_type', array('post','page') );
    }
    return $query;
}
add_filter('pre_get_posts','wpshock_search_filter');

Add this in your Themler settings, CMS code. But I am afraid not all problems are solved by it. Will check later if it search by custom post types. I use them on almost all websites. function wpshock_search_filter( $query ) { if ( $query->is_search ) { $query->set( 'post_type', array('post','page') ); } return $query; } add_filter('pre_get_posts','wpshock_search_filter');
Stagger Lee
1818 Posts
Stagger Lee posted this 20 January 2016

Yes, it works OK. Now this part in URL is just cosmetic, nothing to worry about.

function wpshock_search_filter( $query ) {
    if ( $query->is_search ) {
        $query->set( 'post_type', array('post','page','portfolio','books','events') );
    }
    return $query;
}
add_filter('pre_get_posts','wpshock_search_filter');

Yes, it works OK. Now this part in URL is just cosmetic, nothing to worry about. function wpshock_search_filter( $query ) { if ( $query->is_search ) { $query->set( 'post_type', array('post','page','portfolio','books','events') ); } return $query; } add_filter('pre_get_posts','wpshock_search_filter');
joehannay
12 Posts
joehannay posted this 21 January 2016

Yes, it works OK. Now this part in URL is just cosmetic, nothing to worry about.

function wpshock_search_filter( $query ) {
    if ( $query->is_search ) {
        $query->set( 'post_type', array('post','page','portfolio','books','events') );
    }
    return $query;
}
add_filter('pre_get_posts','wpshock_search_filter');

Thanks Stagger, but can I ask you exactly where I can place this... is it in the stylesheet.css or somewhare else. I would love to try and see if it works.

> Yes, it works OK. Now this part in URL is just cosmetic, nothing to worry about. > > > > function wpshock_search_filter( $query ) { > if ( $query->is_search ) { > $query->set( 'post_type', array('post','page','portfolio','books','events') ); > } > return $query; > } > add_filter('pre_get_posts','wpshock_search_filter'); Thanks Stagger, but can I ask you exactly where I can place this... is it in the stylesheet.css or somewhare else. I would love to try and see if it works.
Stagger Lee
1818 Posts
Stagger Lee posted this 21 January 2016

Home tab at the top - Settings button - CMS Code option in right sidebar.

Home tab at the top - Settings button - CMS Code option in right sidebar.
joehannay
12 Posts
joehannay posted this 23 January 2016

Stagger Lee

Thanks for all of your help, I also asked privately in support,,but their answer was not near as exact and helpful as yours. Your answer is spot on and works like I need it to work with the Themeler Search button not the basic HTML and submit query button. Many thanks...

Stagger Lee Thanks for all of your help, I also asked privately in support,,but their answer was not near as exact and helpful as yours. Your answer is spot on and works like I need it to work with the Themeler Search button not the basic HTML and submit query button. Many thanks...
Stagger Lee
1818 Posts
Stagger Lee posted this 23 January 2016

You are welcome.
If you add "attachment" in array I believe it will search your media files, but I am not sure.

http://casabona.org/2014/12/add-attachments-wordpress-search-results/

You are welcome. If you add "attachment" in array I believe it will search your media files, but I am not sure. http://casabona.org/2014/12/add-attachments-wordpress-search-results/
tti2
15 Posts
tti2 posted this 19 February 2016

Hello,
After reading your post I decided to expand the problem:
Themler Problem with Search Page Layout in Wordpress

Best regards,
AS

Hello, After reading your post I decided to expand the problem: [Themler Problem with Search Page Layout in Wordpress][1] [1]: http://answers.themler.com/questions/62664/themler-problem-with-search-page-layout-in-wordpress Best regards, AS
You must log in or register to leave comments