Changing search slug from + to – (hyphen)
I’ve been fiddling with this all day, where I’m trying to change my search function from website.com/s?this%20is%20an%20example to website.com/tag/this-is-an-example to no avail.
I’ve been fiddling with this all day, where I’m trying to change my search function from website.com/s?this%20is%20an%20example to website.com/tag/this-is-an-example to no avail.
The $q1 and $q2 are working well individually.
I have a custom dashboard that searches based on meta value. It works ok except that I now need to restrict the results/search to a specific post type, shop-subscription.
I have a WP search form where I would like to add a <select> element for a particular taxonomy and its terms (salary bands) for a custom post type of ‘jobs’.
Having finally being able to make an AJAX driven live search functional, I need help understanding how to add an else argument function so that when there are no posts matching the search query, the search box will display “No results found” or whatever text I choose.
I have data saved in user_meta -> areapref field. It is basically a string of comma delimited post IDs (e.g. 2, 37, 200, 300 etc.)
My client’s website has a blog category and many product categories. She would like the search results to include the blog posts, but have the product posts first.
I am using Option 3 from this answer as my source. So far it is working great, it is splitting my search results by post type and listing the posts from each post type in their own sections. The only problem is that this solution does not appear to allow for hyperlinking the post titles using the_permalink(); How can I adapt this code so that I can also wrap the post titles in an anchor tag that will direct to the post?
I have a specific CSS-file for my search results, so the search.php template. I want a PHP if-condition to determine if the current template is the search.php template, so that I can load that CSS-file with wp_enqueue. The condition should work in the functions.php file.
I have two custom taxonomies applied to two custom post types. the terms list on the sidebar just fine and will list all posts associated with it. However, if you search one of the terms in specific, it doesn’t bring up a post with that term.