Move Review out from Tab on Detail Page

This topic contains 6 replies, has 3 voices, and was last updated by  Adeniyi Omikunle 8 years, 2 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket

Tagged: 

  • Author
    Posts
  • #234735

    Adeniyi Omikunle
    Expired Member
    Post count: 56

    Hi

    Please can anyone guide me on how to remove the Review tab and content from the tabs on detail page and move down under the tab section?
    That means when people visit the page, they can see the reviews under the tab section without clicking any tab.

    Thank you.

    #234890

    Kor
    Moderator
    Post count: 16516

    Hi Adeniyi,

    I’d like you to refer to this thread as it explains how you can exclude the review tab and display the review section below the tabs. https://wpgeodirectory.com/support/topic/details-page-how-to-move-rating-stars-from-sidebar-to-content-area/page/2/#post-16090

    Let us know how it goes or if it works.

    Thanks!

    #235004

    Adeniyi Omikunle
    Expired Member
    Post count: 56

    Thanks Kor!

    Exactly what I am looking for.
    I have searched the forum for more than one hour before I finally decided to submit a post.

    Regards

    #235009

    Kor
    Moderator
    Post count: 16516

    Hi Adeniyi,

    Glad that helped. Well, let us know if you need anything further.

    #254543

    Adeniyi Omikunle
    Expired Member
    Post count: 56

    Hi

    Regarding this question I asked before, I used the following code to get the review section to be displayed outside the tabs area.

    
    
    // Add Review after Detail Page Tabs
    add_filter('geodir_detail_page_tab_is_display','geodir_detail_page_tab_is_display_filter',10,2);
    function geodir_detail_page_tab_is_display_filter($value,$type){
    	if($type=='reviews'){return false;}
    	else{return $value;}
    }
    
    add_action( 'geodir_details_main_content', 'comments_template_change_position',65,5);
    function comments_template_change_position(){
    	echo comments_template();
    }

    It works fine on normal listing display but when I preview a new listing, the disqus comment used on my website shows up under the tabs where the review would have showed. At first, I will see normal WP comments with some comments from the demo contents displayed for a few seconds before the disqus comment replaces it. Either way, this is not normal.

    Did I do something wrong with the code. I got it from the link you shared.

    Thanks

    #255543

    Paolo
    Site Admin
    Post count: 31206

    Hi,

    the preview page normally doesn’t show reviews. You should use a conditional tag to exclude adding the reviews in the preview page.

    Add the

    global $preview

    variable to the comments_template_change_position function and then wrap the

    echo comments_template();

    part with

    if (!$preview) { echo comments_template(); }

    Let us know how you went,

    Thanks

    #255555

    Adeniyi Omikunle
    Expired Member
    Post count: 56

    Thank you very much for your help!
    It works fine now.
    Regards

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

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
20% Discount Offer
Hurry! Get your 20% discount before it expires. Get 20% Discount