How we make the filter for fornt end user
I think the issue is on the meta_query you need to add an other argument like ‘compare’ => ‘=’ you can also use relation. I suggest you try the query first.
I think the issue is on the meta_query you need to add an other argument like ‘compare’ => ‘=’ you can also use relation. I suggest you try the query first.
First of all, it works on my test install. I guess it depends on what you are searching for. I’m searching for ‘hello’ and the post ‘Hello World’ shows up fine. Second, I get the following notice for this bit the_post_thumbnail( ‘thumbnail’, $attr );: PHP Notice: Undefined variable: attr Third, just to be a perfectionist, … Read more
How can i retrive the movies, trailers, news in a single page using search
Ok I have figured it out; added the following to functions.php: add_filter( ‘posts_request’, ‘my_request_filter’, 10, 2 ); function my_request_filter($sql, $query) { if($query->is_main_query() && is_search()) { $sql = “SELECT * FROM wp_posts WHERE post_content LIKE ‘[smoothslider%’ AND post_parent !=’0′”; } return $sql; } I understand that with no access to the database or being able to … Read more
Search points to /search/?s=KEYWORD instead of /search/KEYWORD
Why not create a form that submits direct to Google? This would be the simplest solution (assuming you want to search every website in the world): <form action=”http://www.google.com/search” method=”get”> <input type=”text” name=”q” placeholder=”Search Google”/> <input type=”submit” /></form> I believe that would do the job you want it to. The result would look something like: https://www.google.com/search?q=this%20that
I am not sure what you mean by “the actual name”. If you need the class name, look in the source of the theme for extends WP_Widget. Other widget information is stored in the $wpdb->options table under keys starting with widget_. Once you find that you can use get_option( ‘widget_name’ ); to get information about … Read more
It turns out the free Relevanssi plugin does this rather well. I was afraid it would only search posts and not custom post types, but it does it all… and rather well! It only requires a simple filter added to your theme’s functions.php file to get it to omit the body content: // search titles … Read more
I think something like this you would be best writing yourself. Take a look at: http://www.catalysthomes.co.uk/homes-for-sale/ Properties are loaded into a CPT and I have my own custom search in the sidebar. Of that search its searching a number of things such as taxonomies, custom fields and ordering by date price etc. So how do … Read more
get_bloginfo(‘template_directory’) returns a URI and I believe glob works with paths so try: $dir = get_theme_root() . “/documents/*”; foreach(glob($dir) as $file) { echo $file; }