Cannot pass ‘S’ parameter more than two letters

You should use get_query_var instead of $_GET[“s”], this is a built-in wordpress function that retrieves public query variables which would have already been parsed and fed into WP_Query. $args = array(“posts_per_page” => get_option(“posts_per_page”), “post_type” => “astro_game”, “paged” => get_query_var(“paged”), “s” => get_query_var(“s”); Reference: WordPress_Query_Vars

How to pass data to wordpress page (without GET parameter)

It’s completely possible to achieve this by using custom rewrite rules. Right now I don’t have the opportunity to give you the actual code for it, but you can check the documentation for add_rewrite_rule() in the Codex. It’s pretty straightforward if you add a custom parameter to the rewritten URL. Actually, you already have the … Read more

Group search results by category

Add in the search parameter to your query: $search_filters = array( ‘post_type’ => ‘page’, // Doorzoekt alle post types ‘s’ => $keyword // show only posts that meet the current search query ); And above that you should just be able to grab the keyword right from your querystring like so: $keyword = $_GET[‘s’]; There’s … Read more

Search only custom taxonomies

Create a search form that submits a field called “name”. In the file that handles form submissions, // get the “name” the visitor searched for $term = $_POST[‘name’]; // query: find all posts with the ‘people’ taxonomy set to the “name” they searched for $args = array( ‘post_type’ => ‘post’, // or insert your custom … Read more

What is the correct term for a tool that filters content based on metadata?

After additional research, the answer appears to be that the term “taxonomy” encompasses the two sorting tools most common in WordPress. Those are categories, which can be hierarchical, and tags, which cannot have a parent-child relationship. A simple example would be a custom post type called cafes in which you might have parent categories such … Read more

changing search result from only excerpt to full content

according to your 2nd piece of code you’re looking for the loop-search.php. If you’re sure it’s using the content-search though change this line: <section class=”entry”> <?php the_excerpt(); ?> </section><!– /.entry –> to <section class=”entry”> <?php the_content(); ?> </section><!– /.entry –> or add more detail to the content: the_content( ‘Continue reading ‘ . get_the_title() );