Permalink not changing according to post type

Permalink structure for blog posts and pages are managed in WordPress Settings -> Permalinks page, so to make blog posts have permalinks like blog/%postname%/ and you’ve done it right. The tricky part is about Custom Post type permalinks declaration: in your CPT arguments declaration there’s a rewrite rule parameters, which in turn has with_front – … Read more

How to map domains to specific pages in WordPress and display them in the address bar?

Create multisite and use sub-domain names in websites rather than directory. and later Define siteURL in multisite dashboard >> websites >> settings. .htaccess look like this: # BEGIN WordPress RewriteEngine On RewriteBase / RewriteRule ^index\.php$ – [L] # add a trailing slash to /wp-admin RewriteRule ^wp-admin$ wp-admin/ [R=301,L] # avoid error: Request exceeded the limit … Read more

Rewrite Rules are Redirecting

Because WordPress use its own rewrite system with regular expression, so that its rewrite rule when you turned on the permalink, it is just index.php. When it is turned on. It will scan your url and put into parameters. If you do them in .htaccess rewrite, sometimes you will collide in some situations so you … Read more

Custom account page that accepts a query parameter

That add_rewrite_endpoint(“scheduled-order-create/([0-9]+)/?”, …); doesn’t work because add_rewrite_endpoint() doesn’t work with custom RegEx pattern. And remember that in addition to default public query vars like cat, tag, year and author, WordPress also makes all public post types and taxonomies (with a non-empty query_var value when registered — see register_post_type() and register_taxonomy()) be readable from the URL … Read more

Disabling Yoast, All-in-One, and Rank Math on Certain Pages within a Plugin

For anyone that may be interested, I was able to solve this using the following code in mp_custom_page_title: // JetPack remove_action(‘wp_head’,’jetpack_og_tags’); // Yoast SEO if (defined(‘WPSEO_VERSION’)) { global $wpseo_front; if (defined($wpseo_front)) { remove_action(‘wp_head’,array($wpseo_front,’head’),1); } else { $wp_thing = WPSEO_Frontend::get_instance(); remove_action(‘wp_head’,array($wp_thing,’head’),1); } add_filter(‘wpseo_opengraph_url’,’__return_false’); add_filter(‘wpseo_opengraph_desc’,’__return_false’); add_filter(‘wpseo_opengraph_title’,’__return_false’); add_filter(‘wpseo_opengraph_type’,’__return_false’); add_filter(‘wpseo_opengraph_site_name’,’__return_false’); add_filter(‘wpseo_opengraph_image’,’__return_false’); add_filter(‘wpseo_opengraph_author_facebook’,’__return_false’); add_filter(‘Yoast\WP\Woocommerce\product_condition’,’__return_false’); } // All-In-One SEO if (defined(‘AIOSEOP_VERSION’)) … Read more