WordPress.org

Forums

[resolved] P2's functions.php integrated into another theme? (6 posts)

  1. ToreGu
    Member
    Posted 6 years ago #

    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:

      index.php
      styles.css
      functions.php

    (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:

      post-form.php
      inline-comments.php
      comment_form.php
      entry.php
      /i/
      /inc/
      /languages/

    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

  2. ToreGu
    Member
    Posted 6 years ago #

  3. ToreGu
    Member
    Posted 6 years ago #

    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:

    http://www.pearsonified.com/2007/02/how_to_protect_css_mods_for_any_wordpress_theme.php

    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).

    Thanks!

  4. ToreGu
    Member
    Posted 6 years ago #

    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!

  5. ToreGu
    Member
    Posted 5 years ago #

    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.

  6. ToreGu
    Member
    Posted 5 years ago #

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

      rtl.css
      tag.php
      attachment.php
      author.php

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags