Details page: How to move rating stars from sidebar to content area?

This topic contains 25 replies, has 5 voices, and was last updated by  Stiofan O’Connor 9 years, 7 months ago.

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

Open Support Ticket
  • Author
    Posts
  • #15299

    wu
    Free User
    Post count: 41

    I would like to move the star rating and the company info from the sidebar to the content area. I looks like these elements are no widgets and therefore cannot be just attached to other sections.
    Is there an easy way to do this?

    #15308

    JSon
    Free User
    Post count: 22
    This reply has been marked as private.
    #15309

    JSon
    Free User
    Post count: 22
    This reply has been marked as private.
    #15323

    Guust
    Moderator
    Post count: 29970

    To move or add listing data to the content area, go to the relevant custom field, and set “show on listing page? to YES.
    That will add it to the “More info” tab.

    I am not too sure how you move the star rating. Let’s ask one of the developers.

    Nak333, what you are asking requires custom coding.

    #15331

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    Do you want to move it or just have it there also?

    Stiofan

    #15333

    JSon
    Free User
    Post count: 22

    I want business info and rating next to images. But that would be duplicate info showing? or can I can disable info on sidebar? I want it to only show on the right of images as pointed out in the screenshot.

    Slide show of images is too big and when make it smaller i have empty white space next to it and is perfect place to for business info and rating. I want leave sidebar for other stuff such banners.

    Thanks 😉

    #15336

    wu
    Free User
    Post count: 41

    I would like to show it only in the content section.

    #15449

    wu
    Free User
    Post count: 41

    nak333 kind of hijacked the thread with messages that I cannot read, because they are marked as private, while I have no solution for my problem yet. 🙂

    #15456

    JSon
    Free User
    Post count: 22

    I still haven’t hear from support team either. I private my reply because I am sharing my URL which I only want moderator to know. No other secret 🙂

    #15463

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    OK here is a small example. I was not sure if you also just wanted to move the address or everything in that section?

    Here is an example to move the star rating to the main content area

    
    
    // remove star rating from siebar
    add_filter('geodir_detail_page_sidebar_content', 'geodir_detail_page_sidebar_content_order_myfix',10,1);
    
    function geodir_detail_page_sidebar_content_order_myfix($sort){
    	$elements_to_remove = array('geodir_detail_page_review_rating');
    	$sort = array_diff($sort,$elements_to_remove);
    	return $sort;
    }
    
    // add star rating to top of main content
    add_action( 'geodir_details_main_content', 'geodir_detail_page_review_rating',9);

    Thanks,

    Stiofan

    #15717

    wu
    Free User
    Post count: 41

    Thanks for your example.
    I tried to move the other elements as well.
    There are several ones that look like they belong to the social sharing element, but I could not get that working yet.

    #16023

    wu
    Free User
    Post count: 41

    Thanks for your example.
    I tried to move the other elements as well.
    There are several ones that look like they belong to the social sharing element, but I could not get that working yet.

    Any idea? 🙂

    #16028

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    u are trying to move the social sharing buttons?

    Stiofan

    #16042

    wu
    Free User
    Post count: 41

    Actually I mean the favorite/unfavorite link with the heart icon.

    But what I am generally after, is knowing all the hooks and actions that are relevant for the elements that get automatically rendered into the sidebar.
    Same thing for the tabs in the content section.
    I would like to rearrange some things on that page and it would tremendously help to know the relevant hooks and actions.

    #16044

    Stiofan O’Connor
    Site Admin
    Post count: 22956
    'geodir_social_sharing_buttons',							'geodir_share_this_button',							'geodir_detail_page_google_analytics',							'geodir_edit_post_link',							'geodir_detail_page_review_rating',							'geodir_detail_page_more_info'

    If you wanted to remove an element you would add it to the above example array like:

    $elements_to_remove = array('geodir_detail_page_review_rating','geodir_social_sharing_buttons');

    Stiofan

Viewing 15 posts - 1 through 15 (of 26 total)

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

Open Support Ticket