WordPress.org

Forums

Shared functions. (6 posts)

  1. w1nk5
    Member
    Posted 4 years ago #

    What is the best way to share functions between themes. For example, if I wanted to add the exact same custom menus to the dashboard for 10 different themes, how would I do that aside from setting the functions in a parent theme and making the 10 mentioned themes a child of the parent?

    I want to allow users to select between 10 different websites (themes) but every website have the same back-end pretty much.

    Hmm I think I need a parent with child themes.

    Any advice?

  2. you'd hardcode the links right in the theme, making sure those pages (or whatever) are also generated when the site is created.

  3. w1nk5
    Member
    Posted 4 years ago #

    I'm not quite sure what you mean "hardcode the links right in the theme"

    Are you referring to a php include statement in the theme's functions.php that includes the functions.php of the theme's functions I want to copy?

  4. No, I'm referring the a href links. right in the header file where you want the menu to appear.

  5. w1nk5
    Member
    Posted 4 years ago #

    Hmmm, I am already using the WP Replicator plugin to copy page structure when a new website is created. Perhaps I should have been more specific but I want the functions.php file to be exactly the same for all themes except the main blog so when they login into the system they are presented with the same dashboard and back-end.

    It really doesn't have anything to do with the menu in the header. Unless I'm just confused, which is possible. :P

  6. I want the functions.php file to be exactly the same for all themes except the main blog

    then make a copy of the theme, for just the main blog.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.