最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

Load WordPress functions outside WordPress files in Add on Domain

programmeradmin0浏览0评论
Closed. This question is off-topic. It is not currently accepting answers.

Questions that are too localized (such as syntax errors, code with restricted access, hacked sites, hosting or support issues) are not in scope. See how do I ask a good question?

Closed 5 years ago.

Improve this question

I'm unable to load wp-load.php file from wordpress in my ADD ON DOMAIN. I am using require_once('./wp-load.php'); to load wp-load.php and get_header(); to load header in my php file. Primary Domain is loading wordpress functions fine but add domain is not, it is not throwing up any error.

<?php require_once("../wp-load.php"); ?>

I am expecting to load wordpress function in my php file on Add domain like the way Primary domain loads

Closed. This question is off-topic. It is not currently accepting answers.

Questions that are too localized (such as syntax errors, code with restricted access, hacked sites, hosting or support issues) are not in scope. See how do I ask a good question?

Closed 5 years ago.

Improve this question

I'm unable to load wp-load.php file from wordpress in my ADD ON DOMAIN. I am using require_once('./wp-load.php'); to load wp-load.php and get_header(); to load header in my php file. Primary Domain is loading wordpress functions fine but add domain is not, it is not throwing up any error.

<?php require_once("../wp-load.php"); ?>

I am expecting to load wordpress function in my php file on Add domain like the way Primary domain loads

Share Improve this question edited Sep 12, 2019 at 9:10 fuxia 107k39 gold badges255 silver badges459 bronze badges asked Sep 12, 2019 at 9:09 dominic tonuidominic tonui 112 bronze badges 6
  • How is your folder structure and how do you point your DOMAIN and ADD ON DOMAIN to? – Nam Duong Commented Sep 12, 2019 at 9:27
  • public_html>primarydomain files >addon domain folder(inside the primarydomain there is my addon domain folder). – dominic tonui Commented Sep 12, 2019 at 9:33
  • i pointed add on domain inside primary domain – dominic tonui Commented Sep 12, 2019 at 9:34
  • I have install wordpress on both domain – dominic tonui Commented Sep 12, 2019 at 9:36
  • any idea on how to solve this problem? – dominic tonui Commented Sep 12, 2019 at 10:09
 |  Show 1 more comment

1 Answer 1

Reset to default 0

I found the answer, the problem was a wordpress theme. I discover that some themes does not allow anyone to utilize wordpress functions like loading wp-load.php file from wordpress. Thanks to all who commented.

发布评论

评论列表(0)

  1. 暂无评论