Parent/Child Relationships with Multisites?

Yes – this would depend mostly on the theme. You would likely need to create a custom theme or a child theme which would present menus in the way you’re requesting, and you would want to go with a subfolder install vs. a subdomain install. I assume www.mainsite.com/multisite would be the “main” / parent MultiSite, … Read more

redirect any category in URL to the ID and post-name only – hundreds of pages affected

I’d suggest you to forget about htaccess in this case. In your functions.php file add: add_action( ‘template_redirect’, ‘check_missing_urls’ ); function check_missing_urls() { if ( ! is_404() ) { return; } $has_match = preg_match( ‘/\/?(\d+)/’, $_SERVER[‘REQUEST_URI’], $match ); if ( ! $has_match ) { return; } $new_url = get_permalink( $match[1] ); if ( ! $new_url ) … Read more

Custom permalink for one category

Your rewrite rule doesn’t capture anything. Change: ‘^blog/?’ to add the capture group you reference with $matches[1] in your rule: ‘^blog/([^/]+)/?’ visit the Settings > Permalinks page, which will flush rules, and your code should otherwise work.

WordPress and Woocommerce Chinese Permalink

Turns out this was caused by IIS. If you already have <action type=”Rewrite” url=”index.php” /> in your web.config, that should be enough with this addition to your index.php in the WordPress root installation directory if (isset($_SERVER[‘UNENCODED_URL’])) { $_SERVER[‘REQUEST_URI’] = $_SERVER[‘UNENCODED_URL’]; } The php code is quite self explanatory.

Bulk update set of URLs via SQL

OK, so let’s assume you have these URLs in some array (if you don’t, you can easily prepare it using any developer text editor, I guess). Let’s call that array $slugs and let’s say it’s defined like so: $slugs = array( ‘customer-name’ => ‘google-customer-name’, … ); So there are only slugs in there. So now … Read more

Remove Permalink of certain posts

if you want to redirect a few posts to 404 page then you can use use the following snippet in functions.php of your child theme. add_action( ‘template_redirect’, ‘post_redirect_func’ ); function post_redirect_func(){ global $post; $redirect_url = get_template_part( 404 ); // you can write here the page to redirect if this don’t work for you if ($post->ID … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)