How to display comments in tabbed page

Question

I have some custom woocommerce product page. I added some tabs (in functions.php) like this:

function single_tab_callback( $tabs = array() ) {
    $tabs['extra_tab_kom'] = array(
        'title'     => __( 'Komentarze', 'text_domain' ),
        'callback'  => 'tab_content_callback_kom'
    );
    return $tabs;
}
function tab_content_callback_kom(){
    $tresc = get_post(3113);
    echo apply_filters('the_content' , $content );
}

post 3113 is actually a simple page created in admin area.
Of course i have more tabs created like this. In one of them i want to have comments.

I have enabled comments for 3113 page and when looking at that page “alone” it works. But in above code i do not see the comments when i go to that tab.
I tried to add at end of my function
comments_template(); but no luck. Any idea how to add comments (form and all comments) to this page in tab?

0
Pawel B 4 months 0 Answers 11 views 0

Leave an answer