WordPress.org

Ready to get started?Download WordPress

Forums

P2 Theme functions in my theme? (4 posts)

  1. popstalin
    Member
    Posted 4 years ago #

    In the P2 theme there seems to be a way to use two separate comment forms. They use the following code:

    <?php
    		    if ( ( is_home() || is_front_page() ) ) $withcomments = true;
    
    		    if ( is_single() )
    		        comments_template();
    		    else
    		        comments_template('/inline-comments.php');
    
                // Only append comment form to  first post with open comments
                if( ( !isset($form_visible) || !$form_visible ) && !is_single() && 'open' == $post->comment_status ):
                    $form_visible = true;
            ?>

    Basically, I have two separate page templates that I want to employ two separate comment templates on. How would I make the above work for me?

    I've tried the whole including another template file (doesn't work), I've searched the forum and can't find any suggestions that work. I'm hoping someone can answer this question.

    TIA!

  2. ToreGu
    Member
    Posted 4 years ago #

    Hi!

    I've been modifying P2 to sit inside another theme. It involves getting most of the content of index.php, it's functions.php-file and style.css. I'll write more about it if that's what you want. I don't follow your wish to use different commenting. I don't know about that.

    //Tore

  3. DidYaKnow
    Member
    Posted 4 years ago #

    @Tore,

    I just installed P2 on my local server to review it's functionality and I am quite impressed. I want to add its functionality (posting from a page, use of ajax, and recent posts) on my custom theme.

    1. Can you share how you are modifying P2 to sit inside another theme?
    2. Do you know how I can filter the posts by Category? Right now when you post using P2, no category is assigned. So I was thinking, it would be cool to allow the writer to select a category before posting and then use a page to filter posts by category. Any thoughts?

  4. ToreGu
    Member
    Posted 4 years ago #

    Hi!

    As per number one:

    I've posted about this earlier over here:

    http://wordpress.org/support/topic/294161?replies=4

    You can ask for clarification over there.

    Number two: No, I'm going with tags instead. Sorry!

    Thanks!

Topic Closed

This topic has been closed to new replies.

About this Topic