Results 1 to 6 of 6
  1. #1

    Default How to hide "reviews" only from frontpage

    OK, I have searched for an answer, but nothing came up to help me. I will try and post this again, as I really need help doing this.

    I want to remove reviews sidebox from my frontpage, but have it diplayed at all other pages. How do i do this. I assume i need to mess around with reviews.php, but not sure what code to change.

    Thanks

  2. #2
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: How to hide "reviews" only from frontpage

    Either at the point where the Reviews sidebox is called, or at the beginning of the reviews main file, add
    PHP Code:
    if(!$this_is_home_page) {

    (
    code)


    This will cause the code to be executed only if not on the home page.

    You will need to research the correct location for this test.

  3. #3

    Default Re: How to hide "reviews" only from frontpage

    Thanks, but I am too newbie, to figure out where to put in that code. Is anyone able to tell me exactly what to add/replace where and in which docs? I will appreciate this.
    Small technology. Big effect. www.NanoSafeguard.com

  4. #4
    Join Date
    May 2008
    Posts
    402
    Plugin Contributions
    0

    Default Re: How to hide "reviews" only from frontpage

    really can't figure this one out either... the info here is not very easy to follow. Anyone know?

  5. #5
    Join Date
    May 2008
    Posts
    402
    Plugin Contributions
    0

    Default Re: How to hide "reviews" only from frontpage

    finally figured it out. the answer is in this post

    and that post is in this thread

  6. #6
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: How to hide "reviews" only from frontpage

    It would be hard to make that tutorial much simpler. For the specific case of the reviews sidebox, copy and edit
    /includes/modules/sideboxes/YOUR_TEMPLATE_NAME/reviews.php.
    PHP Code:
    /*...
     * @version $Id: reviews.php 2718 2005-12-28 06:42:39Z drbyte $
     */

    // test if box should display (added 20081221 -v)
      
    if ($this_is_home_page) {
        
    $show_reviews false;
      } else {
        
    $show_reviews true;
      }

      if (
    $show_reviews == true) { //(added 20081221 -^)

    // if review must be approved or disabled do not show review
      
    $review_status " and r.status = 1 ";
    //...
    //  MAIN PROCESSING BLOCK
    //...
      
    $title =  BOX_HEADING_REVIEWS;
      
    $title_link FILENAME_REVIEWS;
      require(
    $template->get_template_dir($column_box_defaultDIR_WS_TEMPLATE$current_page_base,'common') . '/' $column_box_default);
      } 
    //(added 20081221)
    ?> 

 

 

Similar Threads

  1. v138a How to hide rel "author" from reviews page?
    By perfumbg in forum General Questions
    Replies: 5
    Last Post: 29 Nov 2012, 06:37 PM
  2. Replies: 0
    Last Post: 27 Nov 2011, 06:04 PM
  3. How do I remove/hide the "Your IP Address is:" from the cart?
    By PastGenToys in forum General Questions
    Replies: 3
    Last Post: 10 Jul 2007, 06:29 AM
  4. How to remove "reviews" only from frontpage
    By nanosafeguard in forum Basic Configuration
    Replies: 0
    Last Post: 26 Apr 2007, 11:38 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg