Conditional Nav Menu Inside Nav Menu Across Multisite Sites
Conditional Nav Menu Inside Nav Menu Across Multisite Sites
Conditional Nav Menu Inside Nav Menu Across Multisite Sites
WordPress redirects to the URL you gave it when you set it up. So if you told WordPress you domain was www.domain.com and typed into the browser domain.com it would redirect to www.domain.com. This is expected. The only way to change that is to change it in the database. You can find the URL in … Read more
So, I’ve managed to achieve a version of this by setting the “home” value in Network admin > Sites > Edit > Settings to: http://example.com/custom-word/multisite-name In my case the custom word is the unique identifier for the multisite, so I had to swap the positions of the word and the name.
You have two options; either bake into the theme (functions.php) or write a simple plugin that auto-creates the post based on hooking into after new site (blog) creation: https://codex.wordpress.org/Plugin_API/Action_Reference/wpmu_new_blog Use the insert post function to do the creation: https://developer.wordpress.org/reference/functions/wp_insert_post/ Then, set as the home page based on ID returned: update_option( ‘page_on_front’, $new_page->ID );
Here’s an example of a solution I configured, which leaves the site in the network, but establishes a domain map from any registered domain, to the network. It makes the network site appear to be a completely independent site, with all the functionality (log-in, etc.) intact. Goal: Map client’s registered domain, both www.foosite.com and foosite.com … Read more
Have a look at the Network Admin Settings screen (in my installation, it’s at example.com/wp-admin/network/settings.php). Tucked away down near the bottom is this: Menu Settings Enable administration menus [] Plugins Checking that box should allow your users to see the Plugins menu in their sites’ back end. (I don’t think it’ll allow them to install … Read more
Here’s what I did: Inserted ob_start() and ob_get_clean(), at strategic places in header.php and footer.php within a child theme derived from my base site’s main theme. <some header stuff> ob_start() <header html I want to reuse across network> <?php $html = ob_get_clean(); echo $html; harvest_html($html, ‘header’); ?> The function harvest_html simply takes the string and … Read more
I actually solved this… here’s what you need to do if anyone needs to do something similar: SO, you can’t really query a site, but you can query pages on sites… so what I did was make a new page on the site where everything looked good, embed the shortcode, query that page and the … Read more
Try using get_posts instead of get_pages $pages = get_posts( array( ‘order’ => ‘ASC’, ‘orderby’ => ‘ID’, ‘post_type’ => ‘page’, ‘post_status’ => ‘publish’, ) );
Found a workaround, remove the user via PHPmyadmin, found in wp_user (find ID of user) and wp_usermeta (find meta info of user). Remove wp_capablities and wp_user_level from wp_usermeta and add the user again to your site via the WP backend. Somehow this reimported the user again and shows up in the user list this time. … Read more