Disable wordpress pagination URL rewrite for specific page

The redirect_canonical filter is responsible for this, which you can selectively disable depending on the requested page. This is untested, but should work: function wpa66273_disable_canonical_redirect( $query ) { if( ‘design-jobs’ == $query->query_vars[‘pagename’] ) remove_filter( ‘template_redirect’, ‘redirect_canonical’ ); } add_action( ‘parse_query’, ‘wpa66273_disable_canonical_redirect’ );

add_rewrite_rule not loading correct page nor getting variables

This seems to work! ?post_type=directors&name=$matches[1] seems to be the key add_rewrite_rule( ‘directors/([^/]*)/showreels/([^/]*)/video/([^/]*)/?’, ‘index.php?post_type=directors&name=$matches[1]&showreel=$matches[2]&video=$matches[3]’, ‘top’ ); so final code now; function wpse13483_init() { add_rewrite_rule( ‘directors/([^/]*)/showreels/([^/]*)/video/([^/]*)/?’, ‘index.php?post_type=directors&name=$matches[1]&showreel=$matches[2]&video=$matches[3]’, ‘top’ ); } add_action( ‘init’, ‘wpse13483_init’ ); function wpa52794_query_vars( $vars) { $vars[] = ‘video’; $vars[] = ‘showreel’; return $vars; } add_filter( ‘query_vars’, ‘wpa52794_query_vars’ );

How to prevent redirection to max 2147483647 for larger values of the page query variable?

The Why Part If we have a page called technical and try to load: example.tld/technical/99999999999999999999 then the 99999999999999999999 part is treated as a page query variable with the value of 2147483647. The reason is this rewrite rule for pages: according to the handy Monkeyman Rewrite Analyzer by Jan Fabry. This part of the WP_Query::get_posts(): if … Read more

How to add dot(“.”) in post slug

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

Is the SEO plugin necessary?

The main purpose of SEO plugin is to give you more control over SEO-related factors (titles, excerpts, meta tags and so on). It doesn’t do anything magical, just an editor to let you fine-tune beyond native WP capabilities. So necessity equals if and how much of those aspects you are willing to spend time on. … Read more