Tag Info

New answers tagged

0

You can detect if you're on the front page of a given site with is_front_page(). You can use the init hook to do a wp_redirect() to any absolute URI you want. add_action( 'init', 'wpse182623_redirect_home_page_only' ); function wpse182623_redirect_home_page_only() { if( is_front_page() ) { wp_redirect( 'http://example.com/some-other-page/' ); ...


1

Just change the http to https in there: @font-face { font-family: 'Open Sans Condensed'; font-style: normal; font-weight: 700 !important; src: local('Open Sans Condensed Bold'), local('OpenSans-CondensedBold'), url(https://themes.googleusercontent.com/static/fonts/opensanscondensed/v6/gk5FxslNkTTHtojXrkp-xOV5Bi3AvzDkLbMkkmS9JR4.woff) format('woff'); ...


0

Found a solution for anyone who may stumble upon this. Basically, each part of a standard WordPress htaccess now has two RewriteConds: one for when it is in a subfolder, and another for when its not. Depending on that evaluation, the appropriate RewriteRule is applied. # BEGIN WordPress RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] # add a ...


6

At first. WordPress Multisite can handle different domains on default - but NOT with alias domains. The settings of each site store the domain. On default install is here a subdomain or folder-structure. But you can add a single domain. Screenshots A example, the first site is with a domain and 2 sites works as subfolders. The last one is different domain. ...


0

Your nginx configuration is fine, you just need to edit the site name in your Multisite settings in the Sites section, and perhaps run a search-replace across the entire database to replace non-www with www links. I'm not sure, but you might additionally need to create a redirect for your non-www domain, although last time I tried that it magically worked on ...


1

Multisite isn't really the best option here. If you need different layouts and styles for, say, the header on different pages, you can use the is_page function to call a different header file depending on which page the user is on. So to load up a different header on your home page as opposed to any other page, in your index.php (or other page template) ...


1

After seeing your clarification in the original question: Every page inside the subsite you're trying to "hide" would need to be set so that only users with the permission level of "Admin" can see the page. Anyone will be able to see that the page exists. Users are not logged in or are logged in but don't have the correct permission level that land on ...


0

You could also add this code to your theme's functions.php file: if (!defined('WP_POST_REVISIONS')) define('WP_POST_REVISIONS', 3); if (!defined('WP_POST_REVISIONS')) define('WP_POST_REVISIONS', false); This code checks if WP_POST_REVISIONS limit has been set in wp-config.php, If it hasn’t then it passes a parameter to the function that limits post ...


0

Update: I've got it working now! It still shows a text box that says the User email must be confirmed, but it DOES create the user regardless of that information. Here is the code I have used: function your_disable_activation( $user, $user_email, $key, $meta = '' ) { // Activate the user $user_id = wpmu_activate_signup( $key ); wp_redirect( /*redirect to ...


1

There is currently a bug in the functionality that handles the NOBLOGREDIRECT constant, which causes 404 errors on the main site to be redirected to the value of the constant. Apparently this is the expected behaviour for sub-directory networks (example.com/subsite), but should not take place on subdomain networks (subsite.example.com). There is a WordPress ...


2

The internet is a big mash of services communicating with each other. Semi dropping out of the network might have been a valid idea in 2000 but it sounds like a stupid idea in 2015 but the amount of damage depends on your site's functionality. If you don't need any 3rd party service on server side then you can do it, but as I said it is a very unlikely ...


2

WordPress uses an HTTP class to make outbound requests. These requests are mainly for plugin, themes and core updates; pull news/rss content; and make third party API requests. There may be many different reasons for disabling outbound requests, security is the primary one. A WP instance with disabled outbound requests is more secure. Many institutions ...


2

In following to my comments on the question the follow examples for a solution. Default Function WordPress have the function get_users to get all users for each site, works on single or multisite area. But to get all users from each site in Multisite network is the switch to each site important. The follow example demonstrate this. // Multisite // get ...


1

Do the sites have different wordpress installs? If so, they probably have different names and you could use <div class="different-content"> if (get_bloginfo('name') == "site-1") { // show stuff for blog named "site-1" } elseif (get_bloginfo('name') == "site-2") { // show stuff for blog named "site-2" } else { //if it's not any of the sites ...


0

check your .htaccess for <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> this is the basic htaccesss parameters a wordpress installation creates during installation. Line no. 3 is important. ...


0

This is how it worked for me: - uploaded the file into site root - ran it from the subsite, like this: http://subsite.mainsite.com/my-script.php It ended up inserting the new post into the subsite.


0

You can use the WP Multisite Popular Posts plugin in order to show most commented posts across the network. This plugin allows you to use a shortcode or a widget in order to display the most commented posts accross the network. You can also choose the number of posts to display in the list and the concerned time period.


0

The easiest thing basedo n the information you provided would be to make Site A part of the Site B multisite network. Then your sites would definitely be sharing the same user table since it is one network. You can also look into domain mapping to make Site A have a totally different domain name from Site B and it's subdomains.


7

get_option() returns an option for the current blog. In single site installation, the current blog is the only blog. So get get_option() returns the option for it. get_site_option() is used to retrieve an option network-wide. It means that you can get the same option from any site of the network. When this function is used in single installation, it ...


4

get_site_option() - Gets a network wide option. This option is usually added in the Network Admin Settings section of a multisite set-up. If I had 50 sites, it would be a pain to go to 50 different sites and set the same option value. Instead I could set the option value once and have it apply across the network for all sites. See ...


6

Your callback function should run when your plugin is network activated or activated for a single site. Either way, it should be working. However, if you intend for the code contained within your callback to be ran for each blog in your network, then be aware that this will not happen out of the box, instead, the code within your callback will in the ...


-1

So I finally found the solution. If installed the: "Extended Super Admins" plugin. And then I the user the Super Admin role, and used the plugin to add a custom role based on the super admin and then it is just check the boxed of the rights he DON'T need to have. It was really that simple!


1

In multisite installation there already is a default admin and super-admin role, and if standard capabilities are different than what you want you can modify them: A default set of capabilities is pre-assigned to each role, but other capabilites can be assigned or removed using the add_cap() and remove_cap() functions. New roles can be introduced or ...


0

The cause of your problems is this line: define( 'NOBLOGREDIRECT', 'http://www.ncc.my' ); If a user visits a blog that doesn't exist, e.g. http://example.ncc.my this is where the user is sent. However there are also sub directory installs, so all requests that aren't found are sent there. The easy fix would be to set up a page called 404 at ncc.my/404 ...


0

How to fix it ? Go in SQL and write this code : UPDATE `wp2_usermeta` SET `meta_key` = REPLACE(`meta_key`, 'wp_', 'wp2_'); UPDATE `wp2_options` SET `option_name` = REPLACE(`option_name`, 'wp_', 'wp2_'); :)


2

You don't need to check is_admin because the function is hooked to admin_init, so is_admin() is always true in the callback; that makes that ( is_admin() || !empty(DOING_AJAX) ) always verify as true. You only need to check if the constant DOING_AJAX is not defined or if it is defined and it is false (both cases are not an AJAX request), combined with the ...


0

I have tried this approach to domain mapping (as outlined by Ipstenu & Andrea Rennick in Multisite 110) with image/content uploads behaving as expected, so you may have some additional issue going on... You should be able to set UPLOAD_PATH and/or UPLOAD_URL_PATH per subsite from wp-admin/options.php Another option might be setting WP_CONTENT_DIR ...


1

Once you define WP_CONTENT_DIR and WP_CONTENT_URL ,your images may still uploaded to old wp-comtent/uploads path to change this go to settings -> media and change the Store uploads in this folder url. Thats it


1

It seems that my edit to your answer was declined, so here you go. All that was missing was the $priority and $accepted_args parameters for the add_action() calls, and the the fixed code below should accomplish what you require. remove_action( 'add_option_new_admin_email', 'update_option_new_admin_email' ); remove_action( 'update_option_new_admin_email', ...


0

As indicated by @David Gard, this can easily be done: <?php remove_action( 'add_option_new_admin_email', 'update_option_new_admin_email' ); remove_action( 'update_option_new_admin_email', 'update_option_new_admin_email' ); /** * Disable the confirmation notices when an administrator * changes their email address. * * @see ...



Top 50 recent answers are included