Tag Info

New answers tagged

2

Regarding the update part in your question: I think the problem here is that you're missing the number of accepted arguments in your add_action() setup. If you check out the Codex, the usage is: add_action( $hook, $function_to_add, $priority, $accepted_args ); where by default $priority = 10 and $accepted_args = 1. So your code snippet should be like: ...


0

Since wordpress multisite uses different tables for all blogs, it is very inefficient to get all recent articles of all blogs (content aggregation) on display time since you have to query all blogs, sort the articles by date and display the ammount you need. Plugins like WordPress Post Indexer (https://premium.wpmudev.org/project/post-indexer) additional ...


2

By now, it is possible without any plugin. WordPress allows you to edit a sites domain and path free of any restrictions once it is created. First of all: create a new site with an arbitrary but valid subdomain: After the site was created follow the »edit site« link in the confirmation message. Here you can alter the domain and/or path on your own ...


1

Using the WordPress XML export doesn't work in every case. Especially if you have to deal with plugins. I had the best results if I first installed the theme and all plugins in the network, created a new site, activated theme and plugins (in case they create data base tables) and then import the WordPress XML. For NextGenGallery it didn't work, though. I ...


0

I solved it & it worked :) In wp_blogs table , Old structure was Domain : localhost/smart_facility_linux Path : / But i changed it to to make it work as follows: For root site: Domain : localhost Path : /smart_facility_linux/ For sub site 1 (any subsite under main site ,I just gave example) : Domain : localhost Path : ...


0

I can't vote up the answer above, but its right... two ways of enabling a theme - one in the network site and making it network activated - this then shows in the all of the sites under appearance as normal. The second is not to network activate and then it shows as you have described and you can enable. You still have to activate the theme as normal mind... ...


0

I do not currently have access to a multi-site, but as far as I remember: Each site in the multi-site install can have their own theme; same with the plugins. However, you can install themes in the main site profile and it will display as optional themes for all the other sites in the multi-site install. I am not sure I answered your question. Please ...


0

Why don't you use a plugin for that? WPMUDEV has a plugin that I used in the past: https://premium.wpmudev.org/project/wordpress-user-synchronization/ It support MU and standard Wordpress installations.


1

If I'm not mistaken you have to set the cookie paths and domain, like it is explained here: Resolving The WordPress Multisite Redirect Loop by Tom McFarlin. In a nutshell: In your wp-config.php file, add the following lines of code: define('ADMIN_COOKIE_PATH', '/'); define('COOKIE_DOMAIN', ''); define('COOKIEPATH', ''); define('SITECOOKIEPATH', ...


0

Have you checked the WPMU Site Wide Categories page? It has a warning that it may be outdated, but it may be a good start. You also have the plugin Multisite Global Terms. Check the code and see if you can make it work or get ideas for your particular case.


0

I think you need to tell us what you mean by "run wp-cron.php the right way" first and foremost. According to Wordpress, it doesn't make sense that you disable wp-cron and yet want it to run... From the Linux perspective, wget-ing or /bin/php-ing wp-cron.php would be correct, but it seems your particular host is limiting your number of php invocations for ...


0

We used to be able to set the directory where files were kept and that option was removed so this might have something to do with the misdirected links. I had the same problem, but I went through and reuploaded the files that weren't working properly. This might not be realistic if you have lots of files but it is one option. Another option is to use a ...


-1

This is some sample code needed for making an individual color scheme. wp_admin_css_color( 'classic', __( 'Classic' ), admin_url( "css/colors-classic.css" ), array( '#07273E', '#14568A', '#D54E21', '#2683AE' ) ); Source file: wp-includes/general-template.php /** * Register color schemes. */ function add_colors() Example: Scroll down to find the ...


0

It just depends on how many sites you want to update. I don't have a lot of sites to manage so I went with individual installs. Most of the updates are automatic these days so everything is easy. I can also test where bugs are easily having different sites. You might need a lot of space though, doing what I do.


0

As stated your use case seems suitable: multiple sites — check shared users — check WP multisite does this. However there aren't that many details in your question beyond that. It is a guesswork to recommend for or against it for such a complicated site, without knowing requirements thoroughly.


0

You also need to define a matching COOKIEHASH for both sites - a random 32 bit string will do. By default, COOKIEHASH is an MD5 hash of the site URL, and is used to generate the default names for all authentication-related cookies. Hence why, at the moment, your cross-domain login isn't working (the names of the cookies aren't consistent, as COOKIEHASH will ...


1

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/' ); ...


2

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 ...



Top 50 recent answers are included