Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #5386

    I’ve seen solutions for other themes, but how do I enable comments on pages for Upscale? It’s enabled on the page(s), but still does not show up.

    Thanks for the help.

    #49957

    Hey,

    in page.php replace:

    get_template_part( 'includes/loop', 'page' );

    with:

    get_template_part( 'includes/loop', 'page' );
    comments_template( '/includes/comments.php');

    #49958

    Thank you. this works on most pages, but not pages that are assigned Dynamic Templates. Is there a way to enable comments on Upscale pages with Dynamic Templates?

    Thanks for the help.

    #49959

    Because of the way how dynamical pages are created it’s not easily possible to add comments. Dynamical pages don’t use standard wordpress templates but the content is buffered. This technique doesn’t allow to use templates directly. You can try to replace following code in includes/helper-templates.php

    if(!$additional_loop->post->post_excerpt || $query_id == $this->post_id)
    {
    $content = get_the_content('<span class="inner_more">'.__('Read more','avia_framework').'</span>');
    $content = apply_filters('the_content', $content);
    $content = str_replace(']]>', ']]>', $content);
    }

    with:

    if(!$additional_loop->post->post_excerpt || $query_id == $this->post_id)
    {
    $content = get_the_content('<span class="inner_more">'.__('Read more','avia_framework').'</span>');
    $content = apply_filters('the_content', $content);
    $content = str_replace(']]>', ']]>', $content);
    ob_start();
    comments_template( '/includes/comments.php');
    $content .= ob_get_contents() ;
    ob_end_clean();
    }

    but I’m not sure if this hack works.

    #49960

    Your solution almost worked. The comments did appear, but they appeared at the top of the page (above the page content and portfolio excerpts). Is there a way to tweak your solution so the comments show up at the bottom of the pages with Dynamic Templates?

    Thanks for the help. I appreciate it.

    #49961

    Update: I’ll ask Kriesi to look into it.

    #49962

    Hey! I checked the solution provided and the output will be shown correct if you use Dudes fix but change:

    $output .= ob_get_contents() ;

    to

    $content .= ob_get_contents() ;

    Cheers!

    Kriesi

    #49963

    Thanks guys, your solution seems to have worked!

    I appreciate the help!

    #49964

    Actually I missed to rename output to content – sorry for that mistake. I corrected the code above for everyones benefit.

    #49965

    I’m sorry, I think I looked at the wrong page, and thought this worked.

    The comments appear under the page content, but above the portfolio excerpts. The comments need to be below the Portfolio Excerpts.

    If you think there is a solution, but we haven’t found it yet, I’ll ask for help one more time. Otherwise, I don’t want to take up too much more of your time (I’ve done so already, I’m sure).

    Thanks for the help.

    #49966

    Yes – this was the problem I noticed while fixing the php error on your server :) – I think at the dynamic template file requires some more changes and checks (you need to check if all elements are generated before you attach the comments section; maybe some user don’t want to display comments on pages and you need to check the post type, etc.). We’ll look into it (but it’s not high priority because we have to fix some crucial bugs first).

Viewing 11 posts - 1 through 11 (of 11 total)

The topic ‘Enable Comments on Pages in Upscale?’ is closed to new replies.