In my local, it works. Here I use rocketeer to deploy the project.
In server, here is the wp-content/themes
directory
./
../
foobar/
.gitignore
index.php -> /var/www/foobar.example.com/shared/wp-content/themes/index.php
twentyfifteen -> /var/www/foobar.example.com/shared/wp-content/themes/twentyfifteen/
In the admin panel, I only see twentyfifteen, but cannot see the foobar.
I'm using Nginx here
server {
listen 80;
server_name foobar.example.com;
root /var/www/foobar.example.com/current;
error_page 404 /index.php;
location / {
index index.php;
try_files $uri $uri/ =404;
}
location ~ \.php$ {
include fastcgi_params;
fastcgi_index index.php;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
location ~/\.ht {
deny all;
}
}
答案 0 :(得分:0)
要让wordpress识别您的主题,您需要在css中添加一个特殊的标题:
/*
Theme Name: Your Theme Name
Theme URI: http://wordpress.org/themes/twentythirteen
Author: Your Name
Author URI: http://wordpress.org/
Description:
Version: 1.0
*/
查看此信息以获取更多信息https://codex.wordpress.org/Theme_Development
答案 1 :(得分:0)
最后我弄明白了原因。我将所有wordpress核心文件符号链接
index.php
我们以require( dirname( __FILE__ ) . '/wp-blog-header.php' );
为例,最后一行是
echo
当我实际dirname( __FILE__ )
时,superview
指向共享文件夹。