admin管理员组文章数量:1122832
I have developped an external app to manage my physical shop. I'm using couples of WordPress functions to perform some actions.
It's works great it I'm using the app from subfolder (example : domain/app/) but I would use it on subdomain (example : app.domain) but I cannot access to it, it redirect everytime on the WordPress site : domain/wp-signup.php?new=app
Do you guys knows how to deal with that ? I could use Rest API but I'm on Wordpress MultiSite contexte, I'm using 'switch_to_blog()' function... to perform some DB calls.
I have developped an external app to manage my physical shop. I'm using couples of WordPress functions to perform some actions.
It's works great it I'm using the app from subfolder (example : domain.com/app/) but I would use it on subdomain (example : app.domain.com) but I cannot access to it, it redirect everytime on the WordPress site : domain.com/wp-signup.php?new=app
Do you guys knows how to deal with that ? I could use Rest API but I'm on Wordpress MultiSite contexte, I'm using 'switch_to_blog()' function... to perform some DB calls.
Share Improve this question asked Sep 24, 2024 at 14:41 Vincent GuesnéVincent Guesné 1931 silver badge12 bronze badges 1- I don't understand the last sentence about API and multisite. If you don't have the endpoint that you need, you can write a plugin to extend the API. – mmm Commented Sep 24, 2024 at 14:45
1 Answer
Reset to default 0I think that's getting triggered by wp-load being unable to identify which blog you're on at load time. I'd try
define( 'SITE_ID_CURRENT_SITE', 1 );
define( 'BLOG_ID_CURRENT_SITE', 1 );
before you include wp-load, looking up the correct IDs for domain.com/app/ from your wp_blogs table.
本文标签: multisiteExternal app using wpload on subdomain
版权声明:本文标题:multisite - External app using wp-load on subdomain 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736288916a1928195.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论