Portfolio pages with comments


  • Member
    s4d
    January 27, 2016 at 4:41 pm #26673

    Hello,
    the Problem:
    How can I add user comments under the Portfolio Template / Sites ?

    This i did
    You first need to enable comments for the custom post type internally, edit your \wp-content\plugins\fortuna_portfolio_cpt\fortuna_portfolio_cpt.php

    and mod this:

    ‘supports’ => array(‘title’, ‘editor’, ‘thumbnail’),
    to this:

    ‘supports’ => array(‘title’, ‘editor’, ‘thumbnail’, ‘comments’),
    Then what you have left is add the code that adds the comments template to your portfolio template you are using, for example: \wp-content\themes\fortuna\single-portfolio.php

    Then:
    Portfolio Page Option Empty

    /wp-content/themes/fortuna/single-portfolio_empty.php

    <?php
    /**
    * Template Name Posts: Portfolio Empty Page
    */

    get_header(); ?>

    <div class=”container”>
    <div class=”post_content section portfolio_page”>
    <?php while(have_posts()): the_post(); ?>

    <div id=”post-<?php the_ID(); ?>” <?php post_class(); ?>>
    <?php the_content(); ?>
    </div>

    <?php endwhile; // END LOOP ?>
    </div>
    </div>

    <?php get_template_part(‘includes/related_portfolio_items_inc’); ?>

    <?php get_footer(); ?>
    <?php
    $show_page_comments = ot_get_option(‘show_page_comments’,'off’) == ‘on’;
    if($show_page_comments) {
    comments_template(”, true);
    }
    ?>

    This is the Site: http://casida.de/portfolio_item/regular-portfolio-item/

    Sorry, this forum is for verified users only. Please Login or Register to continue

Comments are closed.