Rewriting search and pagination base

there are 3 steps towards achieving your goal. 1 – Rewrite rules – wordpress needs to know what to look for and what to map it to add_rewrite_rule( ‘suche/([^/]+)/?$’, ‘index.php?s=$matches[1]’, ‘top’ ); add_rewrite_rule( ‘suche/([^/]+)(/seite/(\d+))/?$’, ‘index.php?s=$matches[1]&paged=$matches[3]’, ‘top’ ); The above adds straight rewrite rules to the rewrite rules array so anytime someone goes to a URL … Read more

List posts based on first letter of posts

This is the code I get from here, but I don’t remember the exact page, and this is my working page of letter B on my website (using the same code as you see below) <?php /* Template Name: Locali per lettera A WordPress template to list page titles by first letter. You should modify … Read more

Change the Search Base in a multi language wordpress

I found the solution. I had to flush rules after I change the search base with the code on the edited question. Here is the final code: $lang = get_bloginfo(“language”); if ( $lang == ‘de-DE’ ) { add_action(‘init’, ‘search_base_german’); function search_base_german() { $search_slug = ‘suche’; // change slug name $GLOBALS[‘wp_rewrite’]->search_base = $search_slug; $GLOBALS[‘wp_rewrite’]->flush_rules(); } }

Combining Meta_Query key values for one array

What if you use IN operator and split the search term in a words array: $args = array( ‘role’ => ‘Subscriber’, ‘meta_query’ => array( array( ‘key’ => ‘membership_class’, ‘value’ => ‘Full’, ‘compare’ => ‘=’, ‘type’ => ‘CHAR’, ), array( ‘relation’ => ‘OR’, array( ‘key’ => ‘first_name’, ‘value’ => explode( ‘ ‘, $usersearch ), ‘compare’ => … Read more