Forum Replies Created

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter bowlins

    (@bowlins)

    FURTHER EDIT:

    I’ve tried to re-create the mini-account block as a full block without children to see if I got some sort of error.

    After creating the following

    <block type="customer/account" name="mini_account" as="mini_account" template="customer/account/mini-account.phtml"/>

    I call the block with

    <?php the_block('mini_account') ?>

    But I get the error message “block not found”.

    However when I change layout to

    <block type="core/template" name="mini_account" as="mini_account" template="customer/account/mini-account.phtml"/>

    Block is found and rendered. Yet, again without user logged in.

    Thread Starter bowlins

    (@bowlins)

    Ok, I’ve sorted it out and I can confirm that WordPress Codex may be obsolete for the part which relates to multisite instances on nginx.

    My following solution is based on modifications to:

    https://codex.www.ads-software.com/Nginx
    https://wiki.nginx.org/WordPress

    And it’s also using the module https://www.ads-software.com/plugins/nginx-helper/

    In case anyone else is having similar issues, this configuration should work when the multisite is installed on root.

    map $uri $blogname{
        ~^(?P<blogpath>/[^/]+/)files/(.*)   $blogpath ;
    }
    
    map $blogname $blogid{
        default               -999;
        ##Include the map.conf file produced by nginx helper (location may vary)
        include /var/www/wp-content/uploads/nginx-helper/map.conf;
    }
    
    server {
    ##Your rules
        location / {
    	try_files $uri $uri/ /index.php?$args;
        }
    
    if (!-e $request_filename) {
            rewrite /wp-admin$ $scheme://$host$uri/ permanent;
            rewrite ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 last;
            rewrite ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 last;
        }
    
    location ~ [^/]\.php(/|$) {
    	fastcgi_split_path_info ^(.+?\.php)(/.*)$;
    	if (!-f $document_root$fastcgi_script_name) {
    		return 404;
    	}
    	# This is a robust solution for path info security issue and works with "cgi.fix_pathinfo = 1" in /etc/php.ini (default)
    
    	include fastcgi.conf;
    	fastcgi_index index.php;
    #	fastcgi_intercept_errors on;
    	fastcgi_pass php;
    }

    And if, like me, you have your WP multisite installed in a subfolder this is what worked for me (just replaced “subfolder” by the name of your folder):

    map $uri $blogname{
        ~^(?P<blogpath>/[^/]+/)files/(.*)   $blogpath ;
    }
    
    map $blogname $blogid{
        default               -999;
        ##Include the map.conf file produced by nginx helper (location may vary)
        include /var/www/wp-content/uploads/nginx-helper/map.conf;
    }
    
    server {
    ##Your rules
    location /subfolder {
                try_files $uri $uri/ /subfolder/index.php?$args;
        }
    
    if (!-e $request_filename) {
            rewrite /wp-admin$ $scheme://$host$uri/ permanent;
            rewrite ^/subfolder/([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) /subfolder/$2 last;
            rewrite ^/subfolder/([_0-9a-zA-Z-]+/)?(.*\.php)$ /subfolder/$2 last;
        }
    location ~ [^/]\.php(/|$) {
    	fastcgi_split_path_info ^(.+?\.php)(/.*)$;
    	if (!-f $document_root$fastcgi_script_name) {
    		return 404;
    	}
    	# This is a robust solution for path info security issue and works with "cgi.fix_pathinfo = 1" in /etc/php.ini (default)
    
    	include fastcgi.conf;
    	fastcgi_index index.php;
    #	fastcgi_intercept_errors on;
    	fastcgi_pass php;
    }
    Thread Starter bowlins

    (@bowlins)

    I was editing functions.php in another theme!!! Duh!

    Thread Starter bowlins

    (@bowlins)

    That’s exactly what I did Geoff. I changed the name of the menus, so now even though visitors get two menus, they are clearly two different menus.

    To change the names go to Appearance/Menus. Just select primary or secondary menu and change the name

    Thread Starter bowlins

    (@bowlins)

    After an elimination process, I have found out that W3 Total Cache needs to be deactivated for menus to work. However, I still get two menus instead of one (unlike the Oxygen demo page)

    Would anyone know how to merge menus?

Viewing 5 replies - 1 through 5 (of 5 total)