Support » Themes and Templates » P2’s functions.php integrated into another theme?

  • Resolved ToreGu


    Hi everyone!

    I’m new to WordPress but know some basics.

    I’m trying to extract the P2-functionality and place it into another theme that I’d like to use. In other words, keep most of the non-P2-theme (header, sidebar, footer and most of the CSS) and integrate with P2 (index.php and supporting files, see below).

    I’ve located that the following files are needed for the extraction of P2s core functionality:


    (the last two have to be integrated to the non-P2-theme and not just replaced)

    and these files can probably just be copy pasted:


    Now to the question:

    How do I go about integrating functions.php from P2 into the existing functions.php from the non-P2-theme? I’m new to this and need some directions.

    P2 is a lovely “theme” and I’d like to see it as a core functionality rather than a theme!

    Tore G

Viewing 5 replies - 1 through 5 (of 5 total)
  • I’ve found most of the conflicting files and the above link (article about functions.php) explained a lot. I’ll see if I’ll upload a short guide for others to follow.

    The conflicting functions.php was resolved using the above link. Just use a user-functions.php for the P2-functions.php. Then you can just copy all the content of index.php to the non-P2-theme. Also make a user-style.css to keep the styling of P2 (and resolve the conflict of these two files). Check this article:

    How to Protect CSS Mods for ANY WordPress Theme

    Now you’ll have to manually edit index.php so that it syncs up with the rest of your non-P2-theme. I’ve yet to get the sidebar functioning as it should but that is probably an issue with some confliciting css-codes (not everything is resolved by using the way mentioned above).


    Hi everyone!

    In case you’ve got problems like I did… I never got the sidebar to show correctly. This was because the P2-theme calls for the sidebar in the header. The artisteer-theme that I was working with didn’t do that. It called for the sidebar in the index.php. This resulted in a sidebar which appeared in the place of index.php (below posts). Be sure to include the code

    <?php get_sidebar( );

    in the header to make it show correctly.

    Have a nice day!

    And you’ve got to use the author.php-file also. Maybe some more. The pop-up picture of keyboard commands isn’t showing as it should.

    Oh, while working on it… These files can be added to your non_p2-theme also (no need for integration, just drop it over):

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘P2’s functions.php integrated into another theme?’ is closed to new replies.