WordPress rewrite with custom parameter doesn’t work
WordPress rewrite with custom parameter doesn’t work
WordPress rewrite with custom parameter doesn’t work
Taxonomy URL rewrite whilst keeping filtered posts?
This should be a comment but I have not enough reputation yet, sorry for that… As Jacob said in his comment this is the normal behaviour. However this issue has already been discussed many times. Check this Q/A as an example: https://stackoverflow.com/questions/17798815/remove-category-tag-base-from-wordpress-url-without-a-plugin
Found the solution, just had to remember all the ? marks. It works when the regex is like this: ‘index.php?catalogs=$matches[1]&p1=$matches[2]&p2=$matches[3]&p3=$matches[4]’
WordPress runs slugs through its sanitize_title_with_dashes() filter function which replaces dots with dashes. Unfortunately the function doesn’t give you any control over that or any ability to change what characters are stripped or replaced. What we can do however is remove that filter and add our own version of it with a couple of modifications: … Read more
add_rewrite_rule() issue with parent/child/child page
So after 2 days of searching I found a solution. Permalink manager lite + this function and all works fine. //Rewrite rule function pm_extra_permastructure_tags($default_uri, $native_slug, $post, $slug, $native_uri) { // Do not affect native URIs if($native_uri == true || empty($post->post_type) || $post->post_type !== ‘mieszkanie’) { return $default_uri; } $inwestycja = get_field(‘inwestycja’, $post->ID); if( !empty($inwestycja) ) … Read more
There is an option for adding custom structure you can select the checkbox and Permalink is generated like this example.com/article2. and there is also a product permalink that is also customizable. Edit There is an option for setting permalink in WordPress setting you can select “post name” check box for getting only post name in … Read more
You can achieve this in WordPress by using custom rewrite rules. Use this code inside theme’s function.php file or inside a plugin. // 1- Create a custom query var add_filter( ‘query_vars’, function ( $query_vars ) { $query_vars[] = ‘my_pdf_file’; return $query_vars; }); // 2- Add a custom rewrite rule. // NOTE: rewrite rules must be … Read more
Test the existence of a page/article by its URL, taking in consideration the URL rewriting by filters