admin管理员组

文章数量:1415663

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

Your question should be specific to WordPress. Generic PHP/JS/SQL/HTML/CSS questions might be better asked at Stack Overflow or another appropriate Stack Exchange network site. Third-party plugins and themes are off-topic for this site; they are better asked about at their developers' support routes.

Closed 5 years ago.

Improve this question

I have 2 different Hotel theme on main and sub domain. How can I have same booking table? So when a person in theme 1 reserved specific date another one could not reserve that date on theme 2?

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

Your question should be specific to WordPress. Generic PHP/JS/SQL/HTML/CSS questions might be better asked at Stack Overflow or another appropriate Stack Exchange network site. Third-party plugins and themes are off-topic for this site; they are better asked about at their developers' support routes.

Closed 5 years ago.

Improve this question

I have 2 different Hotel theme on main and sub domain. How can I have same booking table? So when a person in theme 1 reserved specific date another one could not reserve that date on theme 2?

Share Improve this question asked Aug 14, 2019 at 19:31 Reza MasReza Mas 155 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 0

I'm going to take a crack at this one but I am doing so taking a wild guess as to what you mean.

I am assuming that you have two blogs one on example and one on subsite.example. These might or might not be part of a multi-site setup (you did not say).

In order for both forms to block book the same space, they will need to share a data source. That means both sites using the same database table or some third (hidden) site which they both make API calls to.

For as long as both sites make separate records in their own databases, there is no way to have them know what the other one is doing.

If you have both sites set up as a multisite install, then they at least share a database. However, if the plugin you are using creates a table per site, you still have two separate storages to unite.

Here are some options you might consider:

  1. Talk to the plugin author and ask them if they are willing to help you link the two sites.
  2. Mess about with your database and make the table for one site's plugin an alias of the other's.
  3. Code something yourself that will sync the two tables.
  4. Write a booking system that is designed to have common tables across a multisite setup.
  5. Use an iframe to have both sites show exactly the same form.
  6. Use some JQuery to have one form submit to the other site.
  7. Pay a developer to fix it all for you.

本文标签: How can I have different theme with same booking table