Pulling images from a subdomain

Managed to solve it myself.. So if anyone else has this problem. Because the sub-domain is still under the main domain you do not have to put – /home/hostname/subdomain.com you only need the /home/sub-domain.com and everything will work.. hope this helps someone.. Richard

Redirect subdomain in Multisite installation?

RewriteRule ^(.*)$ https://example.com/summer/$1 [R=301] You need to include the L flag on the RewriteRule directive, ie. [R=301,L] and ensure this rule is near the top of the .htaccess file, before the existing WordPress directives. Without the L flag, processing continues and the request is further rewritten (by the WordPress front-controller) before the eventual (incorrect) redirect.

Relative instead of absolute links in pages?

There is a filter, post_link, that permalinks pass through before being returned from get_permalink in wp-includes/link-template.php. You can use that filter to alter the links. However, beware that making all permalinks relative may have unintended consequences in certain contexts, e.g. you might not want relative links when is_feed() == true. You may find that the … Read more

turn single domain off

Your easiest route is probably to use a plugin like Restricted Site Access (disclaimer: written by my boss) to redirect a user who isn’t logged in elsewhere, like the network home or something else. There are a few other similar plugins out there. Another option would be to take the code you say you’d put … Read more

WPMU Development Environment

Multisite is meant to be either one or the other, and it’s not meant to be changed. If I were you, I’d move it to a testing domain rather than a subdomain, since you’re going to have to change it back when it’s time to move, and I don’t know what sort of behaviors you’ll … Read more

getting content from main domain to sub-domain using category and WP_Query

What you can do is to set up a pre_get_posts() filter in the subdomains’ theme functions.php file to restrict posts to the desired category… function my_subdomain_category( $query ) { if ( $query->is_main_query() ) { $query->set( ‘cat’, ‘123’ ); // use the categoryID for space or products } } add_action( ‘pre_get_posts’, ‘my_subdomain_category’ );

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