Rearrange Sidebar Custom Fields

This topic contains 9 replies, has 3 voices, and was last updated by  Paolo 7 years, 11 months ago.

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

Open Support Ticket

Tagged: 

  • Author
    Posts
  • #320166

    Michael Browning
    Buyer
    Post count: 17

    Hello there, I’ve read through the documentation you’ve got and other responses on this site. We’ve added and styled a custom logo section for our membership to upload their logos, but unfortunately we’ve not found an easy way to move that logo to the top of the list (or sort the list in general). Could I get some guidance on how to do so?

    Another thread had this listed as a potential solution but I’m not sure how to modify it for our needs:

    
    
    function gd_custom_change_sidebar_content_order() {
        return array(
            'geodir_detail_page_review_rating',
            'geodir_social_sharing_buttons',
            'geodir_share_this_button',
            'geodir_detail_page_google_analytics',
            'geodir_edit_post_link',
            'geodir_detail_page_more_info'
        );
    }
    add_filter('geodir_detail_page_sidebar_content', 'gd_custom_change_sidebar_content_order');
    #320180

    Paolo
    Site Admin
    Post count: 31206

    Micheal,

    The logo is added to :

    'geodir_detail_page_more_info',

    so you want that at the top of the list:

    
    
    function gd_custom_change_sidebar_content_order() {
    
        return array(
    
            'geodir_detail_page_more_info',
    
            'geodir_detail_page_review_rating',
    
            'geodir_social_sharing_buttons',
    
            'geodir_share_this_button',
    
            'geodir_detail_page_google_analytics',
    
            'geodir_edit_post_link'
    
        );
    
    }

    You can add that via the Code Snippet plugin.

    Now you’ll need to go to GeoDirectory >> Place settings (if that is the correct CPT) and move the logo field all the way to the top of your list.

    Refresh any detail page where a logo has been added and you should see it at the top of your sidebar.

    Let us know how it goes,

    Thanks

    #320189

    Michael Browning
    Buyer
    Post count: 17

    Awesome, is there a meaningful way to control the order of content inside of More Info?

    #320194

    Paolo
    Site Admin
    Post count: 31206

    Yes, by dragging and dropping the fields in Place Settings.

    Moving the upload field to the top, will make it appear at the top.

    Thanks

    #320195

    Michael Browning
    Buyer
    Post count: 17

    Thanks, sorry that totally did work. 80%. We’re running the Supreme Directory theme and right now the thumbnails and map are still sitting atop the logo. Where might I look to fix that?

    #320200

    Paolo
    Site Admin
    Post count: 31206

    Ok Supreme is an exception, I need to have the developers look at your question. They’ll let you know asap.

    Thanks

    #321848

    Giri
    Expired Member
    Post count: 3155

    Hi Michael,

    Sorry I missed this thread. Just noticed.

    Let me check the code and get back to you with a solution.

    Thanks for your patience.

    #321857

    Giri
    Expired Member
    Post count: 3155
    This reply has been marked as private.
    #322075

    Michael Browning
    Buyer
    Post count: 17

    Giri that’s perfect, I think. Silly question but are all these functions documented somewhere I could produce my own modifications for if need be?

    #322323

    Paolo
    Site Admin
    Post count: 31206

    Hi Micheal,

    all hooks and filters are documented in the codex for developers https://wpgeodirectory.com/codex/codex/, but there are no examples for each of them (they are hundreds).

    Thanks

Viewing 10 posts - 1 through 10 (of 10 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