WordPress permalink not working on subdomain
WordPress permalink not working on subdomain
WordPress permalink not working on subdomain
An excluded ‘ghost’ page is crashing my permalink
Adding a ‘blogs’ prefix in the URL structure but only for blogs
ok – so this isn’t what I wanted but it does the trick. Adding a function to redirect when the user hits any term but one: function my_page_template_redirect() { if( is_singular( ‘custom-post-type’ ) && !(has_term(‘term’, ‘custom-taxonomy’)) ) { wp_redirect( home_url(), 301 ); exit(); } } add_action( ‘template_redirect’, ‘my_page_template_redirect’ ); Answer based on this one: Disable … Read more
How to bulk change media item’s link?
archive by year and category: permalink support doesn’t work on pagination
How to keep WP from creating a “single-post” page and let the user input the link of the post in the dashboard?
ob_get_flush doesn’t do what you think it does. You’re assuming that it only ends the output buffer and returns its contents, which is incorrect, it also flushes the output buffer to the browser. So this: return ob_get_flush(); Is the same as this: $content = ob_get_clean(); echo $content; return $content; Use ob_get_clean(); instead, which erases the … Read more
How to prevent wordpress from lowering Capitalized letters
I wasn’t linking to the page correctly in the rewrite rules. The use of pagename was incorrect instead I should have used page_id. The rewrite rules I ended up using was add_rewrite_rule(‘^resa/start/?$’, ‘index.php?page_id=1897&route_page=start’, ‘top’); add_rewrite_rule(‘^resa/planera/?$’, ‘index.php?page_id=1897&route_page=plan’, ‘top’); add_rewrite_rule(‘^resa/dela/([^/]+)/?$’,’index.php?page_id=1897&route_page=share&share_id=$matches[1]’, ‘top’);