Do child themes share the same database?

Posted in: Newspaper
Post count: 5

URL: http://xxy.fr/

Hi!

Thanks for the nice work! I love the Newspaper theme.

There is something I still would like to know: do child themes use the same database?

I mean, if I change some options like “ads” in Newspaper-child-theme1, does it also affect Newspaper and Newspaper-child-theme2?

In fact, I would like to display the website without the ads for people donating, but I am not sure I can do that because when I try to remove ads from one child-theme, it takes effects for every child-theme.

Is there a way to do so?

Cheeds!

Julien

Post count: 9544

child themes always point to their parent; basically they are a way to “over ride” the parent theme with templates, CSS, etc., but don’t directly change the dbase per se. But, yes, they share the same database as they are only a clever way to make customizations and then redirect to the main parent theme for everything else. The parent theme controls the dbase login/connections from the wp-config.php file.

For info on how WordPress works, always always always a great place to start is the massive online WordPress official “codex” like here:

http://codex.wordpress.org/Child_Themes

TIP: Google search anything WordPress related with coded on the end.

e.g., child themes codex

  • This reply was modified 11 years by simchris.
Post count: 6600

Hi,

Thanks Christopher!

@Julien
As Christopher wrote the child theme do use the same database and you can try to search for a plugin to control the ads but not sure if exists one that could help you not display ads for donors.

Thanks

Post count: 5

OK, I understand.

And now, what If install two Newspaper parent-theme? One in a “Newspaper” folder and the other one in “Newspaper2” folder?

Do they still share the same db?

The final option I see is adding my adsenses codes within the pages but I dislike this option 🙁

Post count: 9544

See the codex; you can have more than one WordPress install use the same database, you simply assign a different “prefix” in your wp-config.php file. You need one child theme folder PER WordPress/theme install.

You really may wish to review the WordPress official docs, as this kind of info, and *many* other things are covered in detail:
http://codex.wordpress.org/Installing_Multiple_Blogs

Viewing 5 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic.