Wp eCommerce meta information search [closed]
You can find a duplicate question here that has a number of suggestions and references to plugins that will help.
You can find a duplicate question here that has a number of suggestions and references to plugins that will help.
Ex. http://www.site.com/?s=as+sa This gives a perfect search result irrespective of the order of words. If you want to add a custom query then you can use following: $query = new WP_Query( ‘s=keyword+keyword2’ ); and iterate through your query result. Try this out.
I fetched some rows on my custom admin page (using hook for adding admin menus). I wanted to add a search box on that page to display only those rows with the ‘name’ column containing searched string in that column. ID | Name _________________ 1 | abc 2 | abc 3 | abz 4 | … Read more
Please try this , <form name=”searchBox” action=”<?php echo get_bloginfo(‘url’); ?>” class=”search-form” method=”get” role=”search” > <input type=”text” name=”s” class=”searchBox” placeholder=”search” value=”<?= $_GET[‘s’] ?>” required /> <button type=”submit” class=”searchBtn” >search</button> </form>
//Search by tags $query = new WP_Query( ‘tag=old’ ); // Then update post titles if ( $query->have_posts() ) { while ( $query->have_posts() ) { $query->the_post(); //check if title have “a new” if(strpos(get_the_title(),’a new’) !== false) : $post = array( ‘ID’=> get_the_id(), ‘post_title’=> str_replace(‘a new’,’an old’,get_the_title()) ); // Update the post into the database wp_update_post( $post … Read more
It seems that this was simply a matter of waiting: the less trafficked pages updated their addresses quickly and the more trafficked pages (e.g., the home page) took longer to be update in Google search results. Other users with more heavily trafficked sites might wish to refer to this article on demoting site links to … Read more
It comes down to needing to disable the search slug, by removing the search rewrite rules. I’ve created a plugin (also on the wp.org repo): https://github.com/GaryJones/disable-search-slug Here’s the main file: <?php /** * Disable Search Slug Plugin * * @package Gamajo\DisableSearchSlug * @author Gary Jones * @license GPL-2.0+ * @copyright 2016 Gamajo Tech * * … Read more
This is added by the theme you are using. And, unless there is an option in theme settings (or customizer) to remove it, you can’t do much about it, because you are hosting on WordPress.com, and unless you pay for the premium plan, you can’t modify plugins or themes.
Look here: if($row->type==’post’){ $result = wp_get_attachment_image_src ($attachment_id, ‘medium’); $url_img = $result[‘url’]; $permalink = get_permalink($row->id); } You are using attachment_id variable, but you have not initiated it anywhere. if($row->type==’post’){ $attachment_id = get_post_thumbnail_id($row->id); $result = wp_get_attachment_image_src ($attachment_id, ‘medium’); $url_img = $result[‘url’]; $permalink = get_permalink($row->id); }
WordPress uses the s key for search. If you add name=”s” to the input field this would probably work out of the box. Also make sure the button element has type=”submit” so your browser knows this is the submit button.